Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

update libmagic pcre dependency to 8.32

  • Loading branch information...
commit 4a369e5a1b6961a7403a2ed158b0a5de55d800ae 1 parent 5fa7d11
@mscdex authored
Showing with 13,521 additions and 21,065 deletions.
  1. +317 −0 deps/libmagic/pcre/ChangeLog
  2. +22 −19 deps/libmagic/pcre/HACKING
  3. +7 −2 deps/libmagic/pcre/INSTALL
  4. +66 −0 deps/libmagic/pcre/NEWS
  5. +639 −0 deps/libmagic/pcre/NON-AUTOTOOLS-BUILD
  6. +3 −574 deps/libmagic/pcre/NON-UNIX-USE
  7. +156 −104 deps/libmagic/pcre/README
  8. +0 −279 deps/libmagic/pcre/config/freebsd/config.h
  9. +137 −72 deps/libmagic/pcre/config/linux/config.h
  10. +143 −78 deps/libmagic/pcre/config/mac/config.h
  11. +35 −327 deps/libmagic/pcre/config/win/config.h
  12. +0 −199 deps/libmagic/pcre/dftables.c
  13. +6 −15 deps/libmagic/pcre/{binding.gyp → pcre.gyp}
  14. +203 −53 deps/libmagic/pcre/pcre.h
  15. +0 −503 deps/libmagic/pcre/pcre.h.in
  16. +0 −45 deps/libmagic/pcre/pcre16_byte_order.c
  17. +0 −45 deps/libmagic/pcre/pcre16_chartables.c
  18. +0 −45 deps/libmagic/pcre/pcre16_compile.c
  19. +0 −45 deps/libmagic/pcre/pcre16_config.c
  20. +0 −45 deps/libmagic/pcre/pcre16_dfa_exec.c
  21. +0 −45 deps/libmagic/pcre/pcre16_exec.c
  22. +0 −45 deps/libmagic/pcre/pcre16_fullinfo.c
  23. +0 −45 deps/libmagic/pcre/pcre16_get.c
  24. +0 −45 deps/libmagic/pcre/pcre16_globals.c
  25. +0 −45 deps/libmagic/pcre/pcre16_jit_compile.c
  26. +0 −45 deps/libmagic/pcre/pcre16_maketables.c
  27. +0 −45 deps/libmagic/pcre/pcre16_newline.c
  28. +0 −95 deps/libmagic/pcre/pcre16_ord2utf16.c
  29. +0 −45 deps/libmagic/pcre/pcre16_printint.c
  30. +0 −45 deps/libmagic/pcre/pcre16_refcount.c
  31. +0 −45 deps/libmagic/pcre/pcre16_string_utils.c
  32. +0 −45 deps/libmagic/pcre/pcre16_study.c
  33. +0 −45 deps/libmagic/pcre/pcre16_tables.c
  34. +0 −45 deps/libmagic/pcre/pcre16_ucd.c
  35. +0 −129 deps/libmagic/pcre/pcre16_utf16_utils.c
  36. +0 −146 deps/libmagic/pcre/pcre16_valid_utf16.c
  37. +0 −45 deps/libmagic/pcre/pcre16_version.c
  38. +0 −45 deps/libmagic/pcre/pcre16_xclass.c
  39. +39 −9 deps/libmagic/pcre/pcre_byte_order.c
  40. +1,232 −1,008 deps/libmagic/pcre/pcre_compile.c
  41. +20 −4 deps/libmagic/pcre/pcre_config.c
  42. +353 −261 deps/libmagic/pcre/pcre_dfa_exec.c
  43. +646 −557 deps/libmagic/pcre/pcre_exec.c
  44. +33 −4 deps/libmagic/pcre/pcre_fullinfo.c
  45. +109 −34 deps/libmagic/pcre/pcre_get.c
  46. +587 −175 deps/libmagic/pcre/pcre_internal.h
  47. +2,885 −1,240 deps/libmagic/pcre/pcre_jit_compile.c
  48. +0 −1,179 deps/libmagic/pcre/pcre_jit_test.c
  49. +6 −3 deps/libmagic/pcre/pcre_maketables.c
  50. +54 −28 deps/libmagic/pcre/pcre_newline.c
  51. +4 −7 deps/libmagic/pcre/pcre_ord2utf8.c
  52. +102 −50 deps/libmagic/pcre/pcre_printint.c
  53. +5 −2 deps/libmagic/pcre/pcre_refcount.c
  54. +44 −1 deps/libmagic/pcre/pcre_string_utils.c
  55. +0 −43 deps/libmagic/pcre/pcre_stringpiece.cc
  56. +3 −3 deps/libmagic/pcre/pcre_stringpiece.h
  57. +122 −87 deps/libmagic/pcre/pcre_study.c
  58. +211 −124 deps/libmagic/pcre/pcre_tables.c
  59. +2,893 −2,576 deps/libmagic/pcre/pcre_ucd.c
  60. +15 −2 deps/libmagic/pcre/pcre_valid_utf8.c
  61. +5 −2 deps/libmagic/pcre/pcre_version.c
  62. +3 −3 deps/libmagic/pcre/pcre_xclass.c
  63. +4 −1 deps/libmagic/pcre/pcrecpp.cc
  64. +4 −4 deps/libmagic/pcre/pcrecpparg.h
  65. +0 −406 deps/libmagic/pcre/pcredemo.c
  66. +0 −845 deps/libmagic/pcre/pcregexp.pas
  67. +0 −2,747 deps/libmagic/pcre/pcregrep.c
  68. +10 −4 deps/libmagic/pcre/pcreposix.c
  69. +4 −9 deps/libmagic/pcre/pcreposix.h
  70. +0 −4,385 deps/libmagic/pcre/pcretest.c
  71. +15 −1 deps/libmagic/pcre/sljit/sljitConfig.h
  72. +100 −40 deps/libmagic/pcre/sljit/sljitConfigInternal.h
  73. +20 −8 deps/libmagic/pcre/sljit/sljitExecAllocator.c
  74. +398 −226 deps/libmagic/pcre/sljit/sljitLir.c
  75. +369 −237 deps/libmagic/pcre/sljit/sljitLir.h
  76. +312 −217 deps/libmagic/pcre/sljit/sljitNativeARM_Thumb2.c
  77. +502 −411 deps/libmagic/pcre/sljit/sljitNativeARM_v5.c
  78. +88 −89 deps/libmagic/pcre/sljit/sljitNativeMIPS_32.c
  79. +444 −392 deps/libmagic/pcre/sljit/sljitNativeMIPS_common.c
  80. +62 −55 deps/libmagic/pcre/sljit/sljitNativePPC_32.c
  81. +84 −91 deps/libmagic/pcre/sljit/sljitNativePPC_64.c
Sorry, we could not display the entire diff because it was too big.
View
317 deps/libmagic/pcre/ChangeLog
@@ -1,6 +1,323 @@
ChangeLog for PCRE
------------------
+Version 8.32 30-November-2012
+-----------------------------
+
+1. Improved JIT compiler optimizations for first character search and single
+ character iterators.
+
+2. Supporting IBM XL C compilers for PPC architectures in the JIT compiler.
+ Patch by Daniel Richard G.
+
+3. Single character iterator optimizations in the JIT compiler.
+
+4. Improved JIT compiler optimizations for character ranges.
+
+5. Rename the "leave" variable names to "quit" to improve WinCE compatibility.
+ Reported by Giuseppe D'Angelo.
+
+6. The PCRE_STARTLINE bit, indicating that a match can occur only at the start
+ of a line, was being set incorrectly in cases where .* appeared inside
+ atomic brackets at the start of a pattern, or where there was a subsequent
+ *PRUNE or *SKIP.
+
+7. Improved instruction cache flush for POWER/PowerPC.
+ Patch by Daniel Richard G.
+
+8. Fixed a number of issues in pcregrep, making it more compatible with GNU
+ grep:
+
+ (a) There is now no limit to the number of patterns to be matched.
+
+ (b) An error is given if a pattern is too long.
+
+ (c) Multiple uses of --exclude, --exclude-dir, --include, and --include-dir
+ are now supported.
+
+ (d) --exclude-from and --include-from (multiple use) have been added.
+
+ (e) Exclusions and inclusions now apply to all files and directories, not
+ just to those obtained from scanning a directory recursively.
+
+ (f) Multiple uses of -f and --file-list are now supported.
+
+ (g) In a Windows environment, the default for -d has been changed from
+ "read" (the GNU grep default) to "skip", because otherwise the presence
+ of a directory in the file list provokes an error.
+
+ (h) The documentation has been revised and clarified in places.
+
+9. Improve the matching speed of capturing brackets.
+
+10. Changed the meaning of \X so that it now matches a Unicode extended
+ grapheme cluster.
+
+11. Patch by Daniel Richard G to the autoconf files to add a macro for sorting
+ out POSIX threads when JIT support is configured.
+
+12. Added support for PCRE_STUDY_EXTRA_NEEDED.
+
+13. In the POSIX wrapper regcomp() function, setting re_nsub field in the preg
+ structure could go wrong in environments where size_t is not the same size
+ as int.
+
+14. Applied user-supplied patch to pcrecpp.cc to allow PCRE_NO_UTF8_CHECK to be
+ set.
+
+15. The EBCDIC support had decayed; later updates to the code had included
+ explicit references to (e.g.) \x0a instead of CHAR_LF. There has been a
+ general tidy up of EBCDIC-related issues, and the documentation was also
+ not quite right. There is now a test that can be run on ASCII systems to
+ check some of the EBCDIC-related things (but is it not a full test).
+
+16. The new PCRE_STUDY_EXTRA_NEEDED option is now used by pcregrep, resulting
+ in a small tidy to the code.
+
+17. Fix JIT tests when UTF is disabled and both 8 and 16 bit mode are enabled.
+
+18. If the --only-matching (-o) option in pcregrep is specified multiple
+ times, each one causes appropriate output. For example, -o1 -o2 outputs the
+ substrings matched by the 1st and 2nd capturing parentheses. A separating
+ string can be specified by --om-separator (default empty).
+
+19. Improving the first n character searches.
+
+20. Turn case lists for horizontal and vertical white space into macros so that
+ they are defined only once.
+
+21. This set of changes together give more compatible Unicode case-folding
+ behaviour for characters that have more than one other case when UCP
+ support is available.
+
+ (a) The Unicode property table now has offsets into a new table of sets of
+ three or more characters that are case-equivalent. The MultiStage2.py
+ script that generates these tables (the pcre_ucd.c file) now scans
+ CaseFolding.txt instead of UnicodeData.txt for character case
+ information.
+
+ (b) The code for adding characters or ranges of characters to a character
+ class has been abstracted into a generalized function that also handles
+ case-independence. In UTF-mode with UCP support, this uses the new data
+ to handle characters with more than one other case.
+
+ (c) A bug that is fixed as a result of (b) is that codepoints less than 256
+ whose other case is greater than 256 are now correctly matched
+ caselessly. Previously, the high codepoint matched the low one, but not
+ vice versa.
+
+ (d) The processing of \h, \H, \v, and \ in character classes now makes use
+ of the new class addition function, using character lists defined as
+ macros alongside the case definitions of 20 above.
+
+ (e) Caseless back references now work with characters that have more than
+ one other case.
+
+ (f) General caseless matching of characters with more than one other case
+ is supported.
+
+22. Unicode character properties were updated from Unicode 6.2.0
+
+23. Improved CMake support under Windows. Patch by Daniel Richard G.
+
+24. Add support for 32-bit character strings, and UTF-32
+
+25. Major JIT compiler update (code refactoring and bugfixing).
+ Experimental Sparc 32 support is added.
+
+26. Applied a modified version of Daniel Richard G's patch to create
+ pcre.h.generic and config.h.generic by "make" instead of in the
+ PrepareRelease script.
+
+27. Added a definition for CHAR_NULL (helpful for the z/OS port), and use it in
+ pcre_compile.c when checking for a zero character.
+
+28. Introducing a native interface for JIT. Through this interface, the compiled
+ machine code can be directly executed. The purpose of this interface is to
+ provide fast pattern matching, so several sanity checks are not performed.
+ However, feature tests are still performed. The new interface provides
+ 1.4x speedup compared to the old one.
+
+29. If pcre_exec() or pcre_dfa_exec() was called with a negative value for
+ the subject string length, the error given was PCRE_ERROR_BADOFFSET, which
+ was confusing. There is now a new error PCRE_ERROR_BADLENGTH for this case.
+
+30. In 8-bit UTF-8 mode, pcretest failed to give an error for data codepoints
+ greater than 0x7fffffff (which cannot be represented in UTF-8, even under
+ the "old" RFC 2279). Instead, it ended up passing a negative length to
+ pcre_exec().
+
+31. Add support for GCC's visibility feature to hide internal functions.
+
+32. Running "pcretest -C pcre8" or "pcretest -C pcre16" gave a spurious error
+ "unknown -C option" after outputting 0 or 1.
+
+33. There is now support for generating a code coverage report for the test
+ suite in environments where gcc is the compiler and lcov is installed. This
+ is mainly for the benefit of the developers.
+
+34. If PCRE is built with --enable-valgrind, certain memory regions are marked
+ unaddressable using valgrind annotations, allowing valgrind to detect
+ invalid memory accesses. This is mainly for the benefit of the developers.
+
+25. (*UTF) can now be used to start a pattern in any of the three libraries.
+
+26. Give configure error if --enable-cpp but no C++ compiler found.
+
+
+Version 8.31 06-July-2012
+-------------------------
+
+1. Fixing a wrong JIT test case and some compiler warnings.
+
+2. Removed a bashism from the RunTest script.
+
+3. Add a cast to pcre_exec.c to fix the warning "unary minus operator applied
+ to unsigned type, result still unsigned" that was given by an MS compiler
+ on encountering the code "-sizeof(xxx)".
+
+4. Partial matching support is added to the JIT compiler.
+
+5. Fixed several bugs concerned with partial matching of items that consist
+ of more than one character:
+
+ (a) /^(..)\1/ did not partially match "aba" because checking references was
+ done on an "all or nothing" basis. This also applied to repeated
+ references.
+
+ (b) \R did not give a hard partial match if \r was found at the end of the
+ subject.
+
+ (c) \X did not give a hard partial match after matching one or more
+ characters at the end of the subject.
+
+ (d) When newline was set to CRLF, a pattern such as /a$/ did not recognize
+ a partial match for the string "\r".
+
+ (e) When newline was set to CRLF, the metacharacter "." did not recognize
+ a partial match for a CR character at the end of the subject string.
+
+6. If JIT is requested using /S++ or -s++ (instead of just /S+ or -s+) when
+ running pcretest, the text "(JIT)" added to the output whenever JIT is
+ actually used to run the match.
+
+7. Individual JIT compile options can be set in pcretest by following -s+[+]
+ or /S+[+] with a digit between 1 and 7.
+
+8. OP_NOT now supports any UTF character not just single-byte ones.
+
+9. (*MARK) control verb is now supported by the JIT compiler.
+
+10. The command "./RunTest list" lists the available tests without actually
+ running any of them. (Because I keep forgetting what they all are.)
+
+11. Add PCRE_INFO_MAXLOOKBEHIND.
+
+12. Applied a (slightly modified) user-supplied patch that improves performance
+ when the heap is used for recursion (compiled with --disable-stack-for-
+ recursion). Instead of malloc and free for each heap frame each time a
+ logical recursion happens, frames are retained on a chain and re-used where
+ possible. This sometimes gives as much as 30% improvement.
+
+13. As documented, (*COMMIT) is now confined to within a recursive subpattern
+ call.
+
+14. As documented, (*COMMIT) is now confined to within a positive assertion.
+
+15. It is now possible to link pcretest with libedit as an alternative to
+ libreadline.
+
+16. (*COMMIT) control verb is now supported by the JIT compiler.
+
+17. The Unicode data tables have been updated to Unicode 6.1.0.
+
+18. Added --file-list option to pcregrep.
+
+19. Added binary file support to pcregrep, including the -a, --binary-files,
+ -I, and --text options.
+
+20. The madvise function is renamed for posix_madvise for QNX compatibility
+ reasons. Fixed by Giuseppe D'Angelo.
+
+21. Fixed a bug for backward assertions with REVERSE 0 in the JIT compiler.
+
+22. Changed the option for creating symbolic links for 16-bit man pages from
+ -s to -sf so that re-installing does not cause issues.
+
+23. Support PCRE_NO_START_OPTIMIZE in JIT as (*MARK) support requires it.
+
+24. Fixed a very old bug in pcretest that caused errors with restarted DFA
+ matches in certain environments (the workspace was not being correctly
+ retained). Also added to pcre_dfa_exec() a simple plausibility check on
+ some of the workspace data at the beginning of a restart.
+
+25. \s*\R was auto-possessifying the \s* when it should not, whereas \S*\R
+ was not doing so when it should - probably a typo introduced by SVN 528
+ (change 8.10/14).
+
+26. When PCRE_UCP was not set, \w+\x{c4} was incorrectly auto-possessifying the
+ \w+ when the character tables indicated that \x{c4} was a word character.
+ There were several related cases, all because the tests for doing a table
+ lookup were testing for characters less than 127 instead of 255.
+
+27. If a pattern contains capturing parentheses that are not used in a match,
+ their slots in the ovector are set to -1. For those that are higher than
+ any matched groups, this happens at the end of processing. In the case when
+ there were back references that the ovector was too small to contain
+ (causing temporary malloc'd memory to be used during matching), and the
+ highest capturing number was not used, memory off the end of the ovector
+ was incorrectly being set to -1. (It was using the size of the temporary
+ memory instead of the true size.)
+
+28. To catch bugs like 27 using valgrind, when pcretest is asked to specify an
+ ovector size, it uses memory at the end of the block that it has got.
+
+29. Check for an overlong MARK name and give an error at compile time. The
+ limit is 255 for the 8-bit library and 65535 for the 16-bit library.
+
+30. JIT compiler update.
+
+31. JIT is now supported on jailbroken iOS devices. Thanks for Ruiger
+ Rill for the patch.
+
+32. Put spaces around SLJIT_PRINT_D in the JIT compiler. Required by CXX11.
+
+33. Variable renamings in the PCRE-JIT compiler. No functionality change.
+
+34. Fixed typos in pcregrep: in two places there was SUPPORT_LIBZ2 instead of
+ SUPPORT_LIBBZ2. This caused a build problem when bzip2 but not gzip (zlib)
+ was enabled.
+
+35. Improve JIT code generation for greedy plus quantifier.
+
+36. When /((?:a?)*)*c/ or /((?>a?)*)*c/ was matched against "aac", it set group
+ 1 to "aa" instead of to an empty string. The bug affected repeated groups
+ that could potentially match an empty string.
+
+37. Optimizing single character iterators in JIT.
+
+38. Wide characters specified with \uxxxx in JavaScript mode are now subject to
+ the same checks as \x{...} characters in non-JavaScript mode. Specifically,
+ codepoints that are too big for the mode are faulted, and in a UTF mode,
+ disallowed codepoints are also faulted.
+
+39. If PCRE was compiled with UTF support, in three places in the DFA
+ matcher there was code that should only have been obeyed in UTF mode, but
+ was being obeyed unconditionally. In 8-bit mode this could cause incorrect
+ processing when bytes with values greater than 127 were present. In 16-bit
+ mode the bug would be provoked by values in the range 0xfc00 to 0xdc00. In
+ both cases the values are those that cannot be the first data item in a UTF
+ character. The three items that might have provoked this were recursions,
+ possessively repeated groups, and atomic groups.
+
+40. Ensure that libpcre is explicitly listed in the link commands for pcretest
+ and pcregrep, because some OS require shared objects to be explicitly
+ passed to ld, causing the link step to fail if they are not.
+
+41. There were two incorrect #ifdefs in pcre_study.c, meaning that, in 16-bit
+ mode, patterns that started with \h* or \R* might be incorrectly matched.
+
+
Version 8.30 04-February-2012
-----------------------------
View
41 deps/libmagic/pcre/HACKING
@@ -49,16 +49,17 @@ complexity in Perl regular expressions, I couldn't do this. In any case, a
first pass through the pattern is helpful for other reasons.
-Support for 16-bit data strings
--------------------------------
+Support for 16-bit and 32-bit data strings
+-------------------------------------------
-From release 8.30, PCRE supports 16-bit as well as 8-bit data strings, by being
-compilable in either 8-bit or 16-bit modes, or both. Thus, two different
-libraries can be created. In the description that follows, the word "short" is
+From release 8.30, PCRE supports 16-bit as well as 8-bit data strings; and from
+release 8.32, PCRE supports 32-bit data strings. The library can be compiled
+in any combination of 8-bit, 16-bit or 32-bit modes, creating different
+libraries. In the description that follows, the word "short" is
used for a 16-bit data quantity, and the word "unit" is used for a quantity
-that is a byte in 8-bit mode and a short in 16-bit mode. However, so as not to
-over-complicate the text, the names of PCRE functions are given in 8-bit form
-only.
+that is a byte in 8-bit mode, a short in 16-bit mode and a 32-bit unsigned
+integer in 32-bit mode. However, so as not to over-complicate the text, the
+names of PCRE functions are given in 8-bit form only.
Computing the memory requirement: how it was
@@ -138,9 +139,10 @@ Format of compiled patterns
---------------------------
The compiled form of a pattern is a vector of units (bytes in 8-bit mode, or
-shorts in 16-bit mode), containing items of variable length. The first unit in
-an item contains an opcode, and the length of the item is either implicit in
-the opcode or contained in the data that follows it.
+shorts in 16-bit mode, 32-bit unsigned integers in 32-bit mode), containing
+items of variable length. The first unit in an item contains an opcode, and
+the length of the item is either implicit in the opcode or contained in the
+data that follows it.
In many cases listed below, LINK_SIZE data values are specified for offsets
within the compiled pattern. LINK_SIZE always specifies a number of bytes. The
@@ -207,7 +209,8 @@ Matching literal characters
The OP_CHAR opcode is followed by a single character that is to be matched
casefully. For caseless matching, OP_CHARI is used. In UTF-8 or UTF-16 modes,
-the character may be more than one unit long.
+the character may be more than one unit long. In UTF-32 mode, characters
+are always exactly one unit long.
Repeating single characters
@@ -228,7 +231,8 @@ following opcodes, which come in caseful and caseless versions:
OP_POSQUERY OP_POSQUERYI
Each opcode is followed by the character that is to be repeated. In ASCII mode,
-these are two-unit items; in UTF-8 or UTF-16 modes, the length is variable.
+these are two-unit items; in UTF-8 or UTF-16 modes, the length is variable; in
+UTF-32 mode these are one-unit items.
Those with "MIN" in their names are the minimizing versions. Those with "POS"
in their names are possessive versions. Other repeats make use of these
opcodes:
@@ -285,9 +289,7 @@ Character classes
If there is only one character in the class, OP_CHAR or OP_CHARI is used for a
positive class, and OP_NOT or OP_NOTI for a negative one (that is, for
-something like [^a]). However, OP_NOT[I] can be used only with single-unit
-characters, so in UTF-8 (UTF-16) mode, the use of OP_NOT[I] applies only to
-characters whose code points are no greater than 127 (0xffff).
+something like [^a]).
Another set of 13 repeating opcodes (called OP_NOTSTAR etc.) are used for
repeated, negated, single-character classes. The normal single-character
@@ -301,7 +303,7 @@ bit map containing a 1 bit for every character that is acceptable. The bits are
counted from the least significant end of each unit. In caseless mode, bits for
both cases are set.
-The reason for having both OP_CLASS and OP_NCLASS is so that, in UTF-8/16 mode,
+The reason for having both OP_CLASS and OP_NCLASS is so that, in UTF-8/16/32 mode,
subject characters with values greater than 255 can be handled correctly. For
OP_CLASS they do not match, whereas for OP_NCLASS they do.
@@ -414,7 +416,8 @@ OP_ASSERTBACK and OP_ASSERTBACK_NOT, and the first opcode inside the assertion
is OP_REVERSE, followed by a two byte (one short) count of the number of
characters to move back the pointer in the subject string. In ASCII mode, the
count is a number of units, but in UTF-8/16 mode each character may occupy more
-than one unit. A separate count is present in each alternative of a lookbehind
+than one unit; in UTF-32 mode each character occupies exactly one unit.
+A separate count is present in each alternative of a lookbehind
assertion, allowing them to have different fixed lengths.
@@ -467,4 +470,4 @@ item giving the length of the next item.
Philip Hazel
-December 2011
+February 2012
View
9 deps/libmagic/pcre/INSTALL
@@ -1,8 +1,8 @@
Installation Instructions
*************************
-Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
-2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+Copyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
+Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
@@ -226,6 +226,11 @@ order to use an ANSI C compiler:
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
View
66 deps/libmagic/pcre/NEWS
@@ -1,6 +1,72 @@
News about PCRE releases
------------------------
+Release 8.32 30-November-2012
+-----------------------------
+
+This release fixes a number of bugs, but also has some new features. These are
+the highlights:
+
+. There is now support for 32-bit character strings and UTF-32. Like the
+ 16-bit support, this is done by compiling a separate 32-bit library.
+
+. \X now matches a Unicode extended grapheme cluster.
+
+. Case-independent matching of Unicode characters that have more than one
+ "other case" now makes all three (or more) characters equivalent. This
+ applies, for example, to Greek Sigma, which has two lowercase versions.
+
+. Unicode character properties are updated to Unicode 6.2.0.
+
+. The EBCDIC support, which had decayed, has had a spring clean.
+
+. A number of JIT optimizations have been added, which give faster JIT
+ execution speed. In addition, a new direct interface to JIT execution is
+ available. This bypasses some of the sanity checks of pcre_exec() to give a
+ noticeable speed-up.
+
+. A number of issues in pcregrep have been fixed, making it more compatible
+ with GNU grep. In particular, --exclude and --include (and variants) apply
+ to all files now, not just those obtained from scanning a directory
+ recursively. In Windows environments, the default action for directories is
+ now "skip" instead of "read" (which provokes an error).
+
+. If the --only-matching (-o) option in pcregrep is specified multiple
+ times, each one causes appropriate output. For example, -o1 -o2 outputs the
+ substrings matched by the 1st and 2nd capturing parentheses. A separating
+ string can be specified by --om-separator (default empty).
+
+. When PCRE is built via Autotools using a version of gcc that has the
+ "visibility" feature, it is used to hide internal library functions that are
+ not part of the public API.
+
+
+Release 8.31 06-July-2012
+-------------------------
+
+This is mainly a bug-fixing release, with a small number of developments:
+
+. The JIT compiler now supports partial matching and the (*MARK) and
+ (*COMMIT) verbs.
+
+. PCRE_INFO_MAXLOOKBEHIND can be used to find the longest lookbehind in a
+ pattern.
+
+. There should be a performance improvement when using the heap instead of the
+ stack for recursion.
+
+. pcregrep can now be linked with libedit as an alternative to libreadline.
+
+. pcregrep now has a --file-list option where the list of files to scan is
+ given as a file.
+
+. pcregrep now recognizes binary files and there are related options.
+
+. The Unicode tables have been updated to 6.1.0.
+
+As always, the full list of changes is in the ChangeLog file.
+
+
Release 8.30 04-February-2012
-----------------------------
View
639 deps/libmagic/pcre/NON-AUTOTOOLS-BUILD
@@ -0,0 +1,639 @@
+Building PCRE without using autotools
+-------------------------------------
+
+This document contains the following sections:
+
+ General
+ Generic instructions for the PCRE C library
+ The C++ wrapper functions
+ Building for virtual Pascal
+ Stack size in Windows environments
+ Linking programs in Windows environments
+ Comments about Win32 builds
+ Building PCRE on Windows with CMake
+ Use of relative paths with CMake on Windows
+ Testing with RunTest.bat
+ Building under Windows with BCC5.5
+ Building PCRE on OpenVMS
+ Building PCRE on Stratus OpenVOS
+ Building PCRE on native z/OS and z/VM
+
+
+GENERAL
+
+I (Philip Hazel) have no experience of Windows or VMS sytems and how their
+libraries work. The items in the PCRE distribution and Makefile that relate to
+anything other than Linux systems are untested by me.
+
+There are some other comments and files (including some documentation in CHM
+format) in the Contrib directory on the FTP site:
+
+ ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/Contrib
+
+The basic PCRE library consists entirely of code written in Standard C, and so
+should compile successfully on any system that has a Standard C compiler and
+library. The C++ wrapper functions are a separate issue (see below).
+
+The PCRE distribution includes a "configure" file for use by the configure/make
+(autotools) build system, as found in many Unix-like environments. The README
+file contains information about the options for "configure".
+
+There is also support for CMake, which some users prefer, especially in Windows
+environments, though it can also be run in Unix-like environments. See the
+section entitled "Building PCRE on Windows with CMake" below.
+
+Versions of config.h and pcre.h are distributed in the PCRE tarballs under the
+names config.h.generic and pcre.h.generic. These are provided for those who
+build PCRE without using "configure" or CMake. If you use "configure" or CMake,
+the .generic versions are not used.
+
+
+GENERIC INSTRUCTIONS FOR THE PCRE C LIBRARY
+
+The following are generic instructions for building the PCRE C library "by
+hand". If you are going to use CMake, this section does not apply to you; you
+can skip ahead to the CMake section.
+
+ (1) Copy or rename the file config.h.generic as config.h, and edit the macro
+ settings that it contains to whatever is appropriate for your environment.
+
+ In particular, you can alter the definition of the NEWLINE macro to
+ specify what character(s) you want to be interpreted as line terminators.
+ In an EBCDIC environment, you MUST change NEWLINE, because its default
+ value is 10, an ASCII LF. The usual EBCDIC newline character is 21 (0x15,
+ NL), though in some cases it may be 37 (0x25).
+
+ When you compile any of the PCRE modules, you must specify -DHAVE_CONFIG_H
+ to your compiler so that config.h is included in the sources.
+
+ An alternative approach is not to edit config.h, but to use -D on the
+ compiler command line to make any changes that you need to the
+ configuration options. In this case -DHAVE_CONFIG_H must not be set.
+
+ NOTE: There have been occasions when the way in which certain parameters
+ in config.h are used has changed between releases. (In the configure/make
+ world, this is handled automatically.) When upgrading to a new release,
+ you are strongly advised to review config.h.generic before re-using what
+ you had previously.
+
+ (2) Copy or rename the file pcre.h.generic as pcre.h.
+
+ (3) EITHER:
+ Copy or rename file pcre_chartables.c.dist as pcre_chartables.c.
+
+ OR:
+ Compile dftables.c as a stand-alone program (using -DHAVE_CONFIG_H if
+ you have set up config.h), and then run it with the single argument
+ "pcre_chartables.c". This generates a set of standard character tables
+ and writes them to that file. The tables are generated using the default
+ C locale for your system. If you want to use a locale that is specified
+ by LC_xxx environment variables, add the -L option to the dftables
+ command. You must use this method if you are building on a system that
+ uses EBCDIC code.
+
+ The tables in pcre_chartables.c are defaults. The caller of PCRE can
+ specify alternative tables at run time.
+
+ (4) Ensure that you have the following header files:
+
+ pcre_internal.h
+ ucp.h
+
+ (5) For an 8-bit library, compile the following source files, setting
+ -DHAVE_CONFIG_H as a compiler option if you have set up config.h with your
+ configuration, or else use other -D settings to change the configuration
+ as required.
+
+ pcre_byte_order.c
+ pcre_chartables.c
+ pcre_compile.c
+ pcre_config.c
+ pcre_dfa_exec.c
+ pcre_exec.c
+ pcre_fullinfo.c
+ pcre_get.c
+ pcre_globals.c
+ pcre_jit_compile.c
+ pcre_maketables.c
+ pcre_newline.c
+ pcre_ord2utf8.c
+ pcre_refcount.c
+ pcre_string_utils.c
+ pcre_study.c
+ pcre_tables.c
+ pcre_ucd.c
+ pcre_valid_utf8.c
+ pcre_version.c
+ pcre_xclass.c
+
+ Make sure that you include -I. in the compiler command (or equivalent for
+ an unusual compiler) so that all included PCRE header files are first
+ sought in the current directory. Otherwise you run the risk of picking up
+ a previously-installed file from somewhere else.
+
+ Note that you must still compile pcre_jit_compile.c, even if you have not
+ defined SUPPORT_JIT in config.h, because when JIT support is not
+ configured, dummy functions are compiled. When JIT support IS configured,
+ pcre_jit_compile.c #includes sources from the sljit subdirectory, where
+ there should be 16 files, all of whose names begin with "sljit".
+
+ (6) Now link all the compiled code into an object library in whichever form
+ your system keeps such libraries. This is the basic PCRE C 8-bit library.
+ If your system has static and shared libraries, you may have to do this
+ once for each type.
+
+ (7) If you want to build a 16-bit library (as well as, or instead of the 8-bit
+ or 32-bit libraries) repeat steps 5-6 with the following files:
+
+ pcre16_byte_order.c
+ pcre16_chartables.c
+ pcre16_compile.c
+ pcre16_config.c
+ pcre16_dfa_exec.c
+ pcre16_exec.c
+ pcre16_fullinfo.c
+ pcre16_get.c
+ pcre16_globals.c
+ pcre16_jit_compile.c
+ pcre16_maketables.c
+ pcre16_newline.c
+ pcre16_ord2utf16.c
+ pcre16_refcount.c
+ pcre16_string_utils.c
+ pcre16_study.c
+ pcre16_tables.c
+ pcre16_ucd.c
+ pcre16_utf16_utils.c
+ pcre16_valid_utf16.c
+ pcre16_version.c
+ pcre16_xclass.c
+
+ (7') If you want to build a 16-bit library (as well as, or instead of the 8-bit
+ or 32-bit libraries) repeat steps 5-6 with the following files:
+
+ pcre32_byte_order.c
+ pcre32_chartables.c
+ pcre32_compile.c
+ pcre32_config.c
+ pcre32_dfa_exec.c
+ pcre32_exec.c
+ pcre32_fullinfo.c
+ pcre32_get.c
+ pcre32_globals.c
+ pcre32_jit_compile.c
+ pcre32_maketables.c
+ pcre32_newline.c
+ pcre32_ord2utf32.c
+ pcre32_refcount.c
+ pcre32_string_utils.c
+ pcre32_study.c
+ pcre32_tables.c
+ pcre32_ucd.c
+ pcre32_utf32_utils.c
+ pcre32_valid_utf32.c
+ pcre32_version.c
+ pcre32_xclass.c
+
+ (8) If you want to build the POSIX wrapper functions (which apply only to the
+ 8-bit library), ensure that you have the pcreposix.h file and then compile
+ pcreposix.c (remembering -DHAVE_CONFIG_H if necessary). Link the result
+ (on its own) as the pcreposix library.
+
+ (9) The pcretest program can be linked with any combination of the 8-bit, 16-bit
+ and 32-bit libraries (depending on what you selected in config.h). Compile
+ pcretest.c and pcre_printint.c (again, don't forget -DHAVE_CONFIG_H) and
+ link them together with the appropriate library/ies. If you compiled an
+ 8-bit library, pcretest also needs the pcreposix wrapper library unless
+ you compiled it with -DNOPOSIX.
+
+(10) Run pcretest on the testinput files in the testdata directory, and check
+ that the output matches the corresponding testoutput files. There are
+ comments about what each test does in the section entitled "Testing PCRE"
+ in the README file. If you compiled more than one of the 8-bit, 16-bit and
+ 32-bit libraries, you need to run pcretest with the -16 option to do 16-bit
+ tests and with the -32 option to do 32-bit tests.
+
+ Some tests are relevant only when certain build-time options are selected.
+ For example, test 4 is for UTF-8/UTF-16/UTF-32 support, and will not run if
+ you have built PCRE without it. See the comments at the start of each
+ testinput file. If you have a suitable Unix-like shell, the RunTest script
+ will run the appropriate tests for you.
+
+ Note that the supplied files are in Unix format, with just LF characters
+ as line terminators. You may need to edit them to change this if your
+ system uses a different convention. If you are using Windows, you probably
+ should use the wintestinput3 file instead of testinput3 (and the
+ corresponding output file). This is a locale test; wintestinput3 sets the
+ locale to "french" rather than "fr_FR", and there some minor output
+ differences.
+
+(11) If you have built PCRE with SUPPORT_JIT, the JIT features will be tested
+ by the testdata files. However, you might also like to build and run
+ the JIT test program, pcre_jit_test.c.
+
+(12) If you want to use the pcregrep command, compile and link pcregrep.c; it
+ uses only the basic 8-bit PCRE library (it does not need the pcreposix
+ library).
+
+
+THE C++ WRAPPER FUNCTIONS
+
+The PCRE distribution also contains some C++ wrapper functions and tests,
+applicable to the 8-bit library, which were contributed by Google Inc. On a
+system that can use "configure" and "make", the functions are automatically
+built into a library called pcrecpp. It should be straightforward to compile
+the .cc files manually on other systems. The files called xxx_unittest.cc are
+test programs for each of the corresponding xxx.cc files.
+
+
+BUILDING FOR VIRTUAL PASCAL
+
+A script for building PCRE using Borland's C++ compiler for use with VPASCAL
+was contributed by Alexander Tokarev. Stefan Weber updated the script and added
+additional files. The following files in the distribution are for building PCRE
+for use with VP/Borland: makevp_c.txt, makevp_l.txt, makevp.bat, pcregexp.pas.
+
+
+STACK SIZE IN WINDOWS ENVIRONMENTS
+
+The default processor stack size of 1Mb in some Windows environments is too
+small for matching patterns that need much recursion. In particular, test 2 may
+fail because of this. Normally, running out of stack causes a crash, but there
+have been cases where the test program has just died silently. See your linker
+documentation for how to increase stack size if you experience problems. The
+Linux default of 8Mb is a reasonable choice for the stack, though even that can
+be too small for some pattern/subject combinations.
+
+PCRE has a compile configuration option to disable the use of stack for
+recursion so that heap is used instead. However, pattern matching is
+significantly slower when this is done. There is more about stack usage in the
+"pcrestack" documentation.
+
+
+LINKING PROGRAMS IN WINDOWS ENVIRONMENTS
+
+If you want to statically link a program against a PCRE library in the form of
+a non-dll .a file, you must define PCRE_STATIC before including pcre.h or
+pcrecpp.h, otherwise the pcre_malloc() and pcre_free() exported functions will
+be declared __declspec(dllimport), with unwanted results.
+
+
+CALLING CONVENTIONS IN WINDOWS ENVIRONMENTS
+
+It is possible to compile programs to use different calling conventions using
+MSVC. Search the web for "calling conventions" for more information. To make it
+easier to change the calling convention for the exported functions in the
+PCRE library, the macro PCRE_CALL_CONVENTION is present in all the external
+definitions. It can be set externally when compiling (e.g. in CFLAGS). If it is
+not set, it defaults to empty; the default calling convention is then used
+(which is what is wanted most of the time).
+
+
+COMMENTS ABOUT WIN32 BUILDS (see also "BUILDING PCRE ON WINDOWS WITH CMAKE")
+
+There are two ways of building PCRE using the "configure, make, make install"
+paradigm on Windows systems: using MinGW or using Cygwin. These are not at all
+the same thing; they are completely different from each other. There is also
+support for building using CMake, which some users find a more straightforward
+way of building PCRE under Windows.
+
+The MinGW home page (http://www.mingw.org/) says this:
+
+ MinGW: A collection of freely available and freely distributable Windows
+ specific header files and import libraries combined with GNU toolsets that
+ allow one to produce native Windows programs that do not rely on any
+ 3rd-party C runtime DLLs.
+
+The Cygwin home page (http://www.cygwin.com/) says this:
+
+ Cygwin is a Linux-like environment for Windows. It consists of two parts:
+
+ . A DLL (cygwin1.dll) which acts as a Linux API emulation layer providing
+ substantial Linux API functionality
+
+ . A collection of tools which provide Linux look and feel.
+
+ The Cygwin DLL currently works with all recent, commercially released x86 32
+ bit and 64 bit versions of Windows, with the exception of Windows CE.
+
+On both MinGW and Cygwin, PCRE should build correctly using:
+
+ ./configure && make && make install
+
+This should create two libraries called libpcre and libpcreposix, and, if you
+have enabled building the C++ wrapper, a third one called libpcrecpp. These are
+independent libraries: when you link with libpcreposix or libpcrecpp you must
+also link with libpcre, which contains the basic functions. (Some earlier
+releases of PCRE included the basic libpcre functions in libpcreposix. This no
+longer happens.)
+
+A user submitted a special-purpose patch that makes it easy to create
+"pcre.dll" under mingw32 using the "msys" environment. It provides "pcre.dll"
+as a special target. If you use this target, no other files are built, and in
+particular, the pcretest and pcregrep programs are not built. An example of how
+this might be used is:
+
+ ./configure --enable-utf --disable-cpp CFLAGS="-03 -s"; make pcre.dll
+
+Using Cygwin's compiler generates libraries and executables that depend on
+cygwin1.dll. If a library that is generated this way is distributed,
+cygwin1.dll has to be distributed as well. Since cygwin1.dll is under the GPL
+licence, this forces not only PCRE to be under the GPL, but also the entire
+application. A distributor who wants to keep their own code proprietary must
+purchase an appropriate Cygwin licence.
+
+MinGW has no such restrictions. The MinGW compiler generates a library or
+executable that can run standalone on Windows without any third party dll or
+licensing issues.
+
+But there is more complication:
+
+If a Cygwin user uses the -mno-cygwin Cygwin gcc flag, what that really does is
+to tell Cygwin's gcc to use the MinGW gcc. Cygwin's gcc is only acting as a
+front end to MinGW's gcc (if you install Cygwin's gcc, you get both Cygwin's
+gcc and MinGW's gcc). So, a user can:
+
+. Build native binaries by using MinGW or by getting Cygwin and using
+ -mno-cygwin.
+
+. Build binaries that depend on cygwin1.dll by using Cygwin with the normal
+ compiler flags.
+
+The test files that are supplied with PCRE are in UNIX format, with LF
+characters as line terminators. Unless your PCRE library uses a default newline
+option that includes LF as a valid newline, it may be necessary to change the
+line terminators in the test files to get some of the tests to work.
+
+
+BUILDING PCRE ON WINDOWS WITH CMAKE
+
+CMake is an alternative configuration facility that can be used instead of
+"configure". CMake creates project files (make files, solution files, etc.)
+tailored to numerous development environments, including Visual Studio,
+Borland, Msys, MinGW, NMake, and Unix. If possible, use short paths with no
+spaces in the names for your CMake installation and your PCRE source and build
+directories.
+
+The following instructions were contributed by a PCRE user. If they are not
+followed exactly, errors may occur. In the event that errors do occur, it is
+recommended that you delete the CMake cache before attempting to repeat the
+CMake build process. In the CMake GUI, the cache can be deleted by selecting
+"File > Delete Cache".
+
+1. Install the latest CMake version available from http://www.cmake.org/, and
+ ensure that cmake\bin is on your path.
+
+2. Unzip (retaining folder structure) the PCRE source tree into a source
+ directory such as C:\pcre. You should ensure your local date and time
+ is not earlier than the file dates in your source dir if the release is
+ very new.
+
+3. Create a new, empty build directory, preferably a subdirectory of the
+ source dir. For example, C:\pcre\pcre-xx\build.
+
+4. Run cmake-gui from the Shell envirornment of your build tool, for example,
+ Msys for Msys/MinGW or Visual Studio Command Prompt for VC/VC++. Do not try
+ to start Cmake from the Windows Start menu, as this can lead to errors.
+
+5. Enter C:\pcre\pcre-xx and C:\pcre\pcre-xx\build for the source and build
+ directories, respectively.
+
+6. Hit the "Configure" button.
+
+7. Select the particular IDE / build tool that you are using (Visual
+ Studio, MSYS makefiles, MinGW makefiles, etc.)
+
+8. The GUI will then list several configuration options. This is where
+ you can enable UTF-8 support or other PCRE optional features.
+
+9. Hit "Configure" again. The adjacent "Generate" button should now be
+ active.
+
+10. Hit "Generate".
+
+11. The build directory should now contain a usable build system, be it a
+ solution file for Visual Studio, makefiles for MinGW, etc. Exit from
+ cmake-gui and use the generated build system with your compiler or IDE.
+ E.g., for MinGW you can run "make", or for Visual Studio, open the PCRE
+ solution, select the desired configuration (Debug, or Release, etc.) and
+ build the ALL_BUILD project.
+
+12. If during configuration with cmake-gui you've elected to build the test
+ programs, you can execute them by building the test project. E.g., for
+ MinGW: "make test"; for Visual Studio build the RUN_TESTS project. The
+ most recent build configuration is targeted by the tests. A summary of
+ test results is presented. Complete test output is subsequently
+ available for review in Testing\Temporary under your build dir.
+
+
+USE OF RELATIVE PATHS WITH CMAKE ON WINDOWS
+
+A PCRE user comments as follows:
+
+I thought that others may want to know the current state of
+CMAKE_USE_RELATIVE_PATHS support on Windows.
+
+Here it is:
+-- AdditionalIncludeDirectories is only partially modified (only the
+first path - see below)
+-- Only some of the contained file paths are modified - shown below for
+pcre.vcproj
+-- It properly modifies
+
+I am sure CMake people can fix that if they want to. Until then one will
+need to replace existing absolute paths in project files with relative
+paths manually (e.g. from VS) - relative to project file location. I did
+just that before being told to try CMAKE_USE_RELATIVE_PATHS. Not a big
+deal.
+
+AdditionalIncludeDirectories="E:\builds\pcre\build;E:\builds\pcre\pcre-7.5;"
+AdditionalIncludeDirectories=".;E:\builds\pcre\pcre-7.5;"
+
+RelativePath="pcre.h">
+RelativePath="pcre_chartables.c">
+RelativePath="pcre_chartables.c.rule">
+
+
+TESTING WITH RUNTEST.BAT
+
+If configured with CMake, building the test project ("make test" or building
+ALL_TESTS in Visual Studio) creates (and runs) pcre_test.bat (and depending
+on your configuration options, possibly other test programs) in the build
+directory. Pcre_test.bat runs RunTest.Bat with correct source and exe paths.
+
+For manual testing with RunTest.bat, provided the build dir is a subdirectory
+of the source directory: Open command shell window. Chdir to the location
+of your pcretest.exe and pcregrep.exe programs. Call RunTest.bat with
+"..\RunTest.Bat" or "..\..\RunTest.bat" as appropriate.
+
+To run only a particular test with RunTest.Bat provide a test number argument.
+
+Otherwise:
+
+1. Copy RunTest.bat into the directory where pcretest.exe and pcregrep.exe
+ have been created.
+
+2. Edit RunTest.bat to indentify the full or relative location of
+ the pcre source (wherein which the testdata folder resides), e.g.:
+
+ set srcdir=C:\pcre\pcre-8.20
+
+3. In a Windows command environment, chdir to the location of your bat and
+ exe programs.
+
+4. Run RunTest.bat. Test outputs will automatically be compared to expected
+ results, and discrepancies will be identified in the console output.
+
+To independently test the just-in-time compiler, run pcre_jit_test.exe.
+To test pcrecpp, run pcrecpp_unittest.exe, pcre_stringpiece_unittest.exe and
+pcre_scanner_unittest.exe.
+
+
+BUILDING UNDER WINDOWS WITH BCC5.5
+
+Michael Roy sent these comments about building PCRE under Windows with BCC5.5:
+
+ Some of the core BCC libraries have a version of PCRE from 1998 built in,
+ which can lead to pcre_exec() giving an erroneous PCRE_ERROR_NULL from a
+ version mismatch. I'm including an easy workaround below, if you'd like to
+ include it in the non-unix instructions:
+
+ When linking a project with BCC5.5, pcre.lib must be included before any of
+ the libraries cw32.lib, cw32i.lib, cw32mt.lib, and cw32mti.lib on the command
+ line.
+
+
+BUILDING UNDER WINDOWS CE WITH VISUAL STUDIO 200x
+
+Vincent Richomme sent a zip archive of files to help with this process. They
+can be found in the file "pcre-vsbuild.zip" in the Contrib directory of the FTP
+site.
+
+
+BUILDING PCRE ON OPENVMS
+
+Dan Mooney sent the following comments about building PCRE on OpenVMS. They
+relate to an older version of PCRE that used fewer source files, so the exact
+commands will need changing. See the current list of source files above.
+
+"It was quite easy to compile and link the library. I don't have a formal
+make file but the attached file [reproduced below] contains the OpenVMS DCL
+commands I used to build the library. I had to add #define
+POSIX_MALLOC_THRESHOLD 10 to pcre.h since it was not defined anywhere.
+
+The library was built on:
+O/S: HP OpenVMS v7.3-1
+Compiler: Compaq C v6.5-001-48BCD
+Linker: vA13-01
+
+The test results did not match 100% due to the issues you mention in your
+documentation regarding isprint(), iscntrl(), isgraph() and ispunct(). I
+modified some of the character tables temporarily and was able to get the
+results to match. Tests using the fr locale did not match since I don't have
+that locale loaded. The study size was always reported to be 3 less than the
+value in the standard test output files."
+
+=========================
+$! This DCL procedure builds PCRE on OpenVMS
+$!
+$! I followed the instructions in the non-unix-use file in the distribution.
+$!
+$ COMPILE == "CC/LIST/NOMEMBER_ALIGNMENT/PREFIX_LIBRARY_ENTRIES=ALL_ENTRIES
+$ COMPILE DFTABLES.C
+$ LINK/EXE=DFTABLES.EXE DFTABLES.OBJ
+$ RUN DFTABLES.EXE/OUTPUT=CHARTABLES.C
+$ COMPILE MAKETABLES.C
+$ COMPILE GET.C
+$ COMPILE STUDY.C
+$! I had to set POSIX_MALLOC_THRESHOLD to 10 in PCRE.H since the symbol
+$! did not seem to be defined anywhere.
+$! I edited pcre.h and added #DEFINE SUPPORT_UTF8 to enable UTF8 support.
+$ COMPILE PCRE.C
+$ LIB/CREATE PCRE MAKETABLES.OBJ, GET.OBJ, STUDY.OBJ, PCRE.OBJ
+$! I had to set POSIX_MALLOC_THRESHOLD to 10 in PCRE.H since the symbol
+$! did not seem to be defined anywhere.
+$ COMPILE PCREPOSIX.C
+$ LIB/CREATE PCREPOSIX PCREPOSIX.OBJ
+$ COMPILE PCRETEST.C
+$ LINK/EXE=PCRETEST.EXE PCRETEST.OBJ, PCRE/LIB, PCREPOSIX/LIB
+$! C programs that want access to command line arguments must be
+$! defined as a symbol
+$ PCRETEST :== "$ SYS$ROADSUSERS:[DMOONEY.REGEXP]PCRETEST.EXE"
+$! Arguments must be enclosed in quotes.
+$ PCRETEST "-C"
+$! Test results:
+$!
+$! The test results did not match 100%. The functions isprint(), iscntrl(),
+$! isgraph() and ispunct() on OpenVMS must not produce the same results
+$! as the system that built the test output files provided with the
+$! distribution.
+$!
+$! The study size did not match and was always 3 less on OpenVMS.
+$!
+$! Locale could not be set to fr
+$!
+=========================
+
+
+BUILDING PCRE ON STRATUS OPENVOS
+
+These notes on the port of PCRE to VOS (lightly edited) were supplied by
+Ashutosh Warikoo, whose email address has the local part awarikoo and the
+domain nse.co.in. The port was for version 7.9 in August 2009.
+
+1. Building PCRE
+
+I built pcre on OpenVOS Release 17.0.1at using GNU Tools 3.4a without any
+problems. I used the following packages to build PCRE:
+
+ ftp://ftp.stratus.com/pub/vos/posix/ga/posix.save.evf.gz
+
+Please read and follow the instructions that come with these packages. To start
+the build of pcre, from the root of the package type:
+
+ ./build.sh
+
+2. Installing PCRE
+
+Once you have successfully built PCRE, login to the SysAdmin group, switch to
+the root user, and type
+
+ [ !create_dir (master_disk)>usr --if needed ]
+ [ !create_dir (master_disk)>usr>local --if needed ]
+ !gmake install
+
+This installs PCRE and its man pages into /usr/local. You can add
+(master_disk)>usr>local>bin to your command search paths, or if you are in
+BASH, add /usr/local/bin to the PATH environment variable.
+
+4. Restrictions
+
+This port requires readline library optionally. However during the build I
+faced some yet unexplored errors while linking with readline. As it was an
+optional component I chose to disable it.
+
+5. Known Problems
+
+I ran the test suite, but you will have to be your own judge of whether this
+command, and this port, suits your purposes. If you find any problems that
+appear to be related to the port itself, please let me know. Please see the
+build.log file in the root of the package also.
+
+
+BUILDING PCRE ON NATIVE Z/OS AND Z/VM
+
+z/OS and z/VM are operating systems for mainframe computers, produced by IBM.
+The character code used is EBCDIC, not ASCII or Unicode. In z/OS, UNIX APIs and
+applications can be supported through UNIX System Services, and in such an
+environment PCRE can be built in the same way as in other systems. However, in
+native z/OS (without UNIX System Services) and in z/VM, special ports are
+required. For details, please see this web site:
+
+ http://www.zaconsultants.net
+
+There is also a mirror here:
+
+ http://www.vsoft-software.com/downloads.html
+
+==========================
+Last Updated: 21 November 2012
View
577 deps/libmagic/pcre/NON-UNIX-USE
@@ -1,578 +1,7 @@
Compiling PCRE on non-Unix systems
----------------------------------
-This document contains the following sections:
+This has been renamed to better reflect its contents. Please see the file
+NON-AUTOTOOLS-BUILD for details of how to build PCRE without using autotools.
- General
- Generic instructions for the PCRE C library
- The C++ wrapper functions
- Building for virtual Pascal
- Stack size in Windows environments
- Linking programs in Windows environments
- Comments about Win32 builds
- Building PCRE on Windows with CMake
- Use of relative paths with CMake on Windows
- Testing with RunTest.bat
- Building under Windows with BCC5.5
- Building PCRE on OpenVMS
- Building PCRE on Stratus OpenVOS
-
-
-GENERAL
-
-I (Philip Hazel) have no experience of Windows or VMS sytems and how their
-libraries work. The items in the PCRE distribution and Makefile that relate to
-anything other than Unix-like systems are untested by me.
-
-There are some other comments and files (including some documentation in CHM
-format) in the Contrib directory on the FTP site:
-
- ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/Contrib
-
-If you want to compile PCRE for a non-Unix system (especially for a system that
-does not support "configure" and "make" files), note that the basic PCRE
-library consists entirely of code written in Standard C, and so should compile
-successfully on any system that has a Standard C compiler and library. The C++
-wrapper functions are a separate issue (see below).
-
-The PCRE distribution includes a "configure" file for use by the Configure/Make
-build system, as found in many Unix-like environments. There is also support
-for CMake, which some users prefer, especially in Windows environments. See
-the instructions for CMake under Windows in the section entitled "Building
-PCRE with CMake" below. CMake can also be used to build PCRE in Unix-like
-systems.
-
-
-GENERIC INSTRUCTIONS FOR THE PCRE C LIBRARY
-
-The following are generic instructions for building the PCRE C library "by
-hand":
-
- (1) Copy or rename the file config.h.generic as config.h, and edit the macro
- settings that it contains to whatever is appropriate for your environment.
- In particular, if you want to force a specific value for newline, you can
- define the NEWLINE macro. When you compile any of the PCRE modules, you
- must specify -DHAVE_CONFIG_H to your compiler so that config.h is included
- in the sources.
-
- An alternative approach is not to edit config.h, but to use -D on the
- compiler command line to make any changes that you need to the
- configuration options. In this case -DHAVE_CONFIG_H must not be set.
-
- NOTE: There have been occasions when the way in which certain parameters
- in config.h are used has changed between releases. (In the configure/make
- world, this is handled automatically.) When upgrading to a new release,
- you are strongly advised to review config.h.generic before re-using what
- you had previously.
-
- (2) Copy or rename the file pcre.h.generic as pcre.h.
-
- (3) EITHER:
- Copy or rename file pcre_chartables.c.dist as pcre_chartables.c.
-
- OR:
- Compile dftables.c as a stand-alone program (using -DHAVE_CONFIG_H if
- you have set up config.h), and then run it with the single argument
- "pcre_chartables.c". This generates a set of standard character tables
- and writes them to that file. The tables are generated using the default
- C locale for your system. If you want to use a locale that is specified
- by LC_xxx environment variables, add the -L option to the dftables
- command. You must use this method if you are building on a system that
- uses EBCDIC code.
-
- The tables in pcre_chartables.c are defaults. The caller of PCRE can
- specify alternative tables at run time.
-
- (4) Ensure that you have the following header files:
-
- pcre_internal.h
- ucp.h
-
- (5) For an 8-bit library, compile the following source files, setting
- -DHAVE_CONFIG_H as a compiler option if you have set up config.h with your
- configuration, or else use other -D settings to change the configuration
- as required.
-
- pcre_byte_order.c
- pcre_chartables.c
- pcre_compile.c
- pcre_config.c
- pcre_dfa_exec.c
- pcre_exec.c
- pcre_fullinfo.c
- pcre_get.c
- pcre_globals.c
- pcre_maketables.c
- pcre_newline.c
- pcre_ord2utf8.c
- pcre_refcount.c
- pcre_string_utils.c
- pcre_study.c
- pcre_tables.c
- pcre_ucd.c
- pcre_valid_utf8.c
- pcre_version.c
- pcre_xclass.c
-
- Make sure that you include -I. in the compiler command (or equivalent for
- an unusual compiler) so that all included PCRE header files are first
- sought in the current directory. Otherwise you run the risk of picking up
- a previously-installed file from somewhere else.
-
- (6) If you have defined SUPPORT_JIT in config.h, you must also compile
-
- pcre_jit_compile.c
-
- This file #includes sources from the sljit subdirectory, where there
- should be 16 files, all of whose names begin with "sljit".
-
- (7) Now link all the compiled code into an object library in whichever form
- your system keeps such libraries. This is the basic PCRE C 8-bit library.
- If your system has static and shared libraries, you may have to do this
- once for each type.
-
- (8) If you want to build a 16-bit library (as well as, or instead of the 8-bit
- library) repeat steps 5-7 with the following files:
-
- pcre16_byte_order.c
- pcre16_chartables.c
- pcre16_compile.c
- pcre16_config.c
- pcre16_dfa_exec.c
- pcre16_exec.c
- pcre16_fullinfo.c
- pcre16_get.c
- pcre16_globals.c
- pcre16_jit_compile.c (if SUPPORT_JIT is defined)
- pcre16_maketables.c
- pcre16_newline.c
- pcre16_ord2utf16.c
- pcre16_refcount.c
- pcre16_string_utils.c
- pcre16_study.c
- pcre16_tables.c
- pcre16_ucd.c
- pcre16_utf16_utils.c
- pcre16_valid_utf16.c
- pcre16_version.c
- pcre16_xclass.c
-
- (9) If you want to build the POSIX wrapper functions (which apply only to the
- 8-bit library), ensure that you have the pcreposix.h file and then compile
- pcreposix.c (remembering -DHAVE_CONFIG_H if necessary). Link the result
- (on its own) as the pcreposix library.
-
-(10) The pcretest program can be linked with either or both of the 8-bit and
- 16-bit libraries (depending on what you selected in config.h). Compile
- pcretest.c and pcre_printint.c (again, don't forget -DHAVE_CONFIG_H) and
- link them together with the appropriate library/ies. If you compiled an
- 8-bit library, pcretest also needs the pcreposix wrapper library unless
- you compiled it with -DNOPOSIX.
-
-(11) Run pcretest on the testinput files in the testdata directory, and check
- that the output matches the corresponding testoutput files. If you
- compiled both an 8-bit and a 16-bit library, you need to run pcretest with
- the -16 option to do 16-bit tests.
-
- Some tests are relevant only when certain build-time options are selected.
- For example, test 4 is for UTF-8 or UTF-16 support, and will not run if
- you have built PCRE without it. See the comments at the start of each
- testinput file. If you have a suitable Unix-like shell, the RunTest script
- will run the appropriate tests for you.
-
- Note that the supplied files are in Unix format, with just LF characters
- as line terminators. You may need to edit them to change this if your
- system uses a different convention. If you are using Windows, you probably
- should use the wintestinput3 file instead of testinput3 (and the
- corresponding output file). This is a locale test; wintestinput3 sets the
- locale to "french" rather than "fr_FR", and there some minor output
- differences.
-
-(12) If you have built PCRE with SUPPORT_JIT, the JIT features will be tested
- by the testdata files. However, you might also like to build and run
- the JIT test program, pcre_jit_test.c.
-
-(13) If you want to use the pcregrep command, compile and link pcregrep.c; it
- uses only the basic 8-bit PCRE library (it does not need the pcreposix
- library).
-
-
-THE C++ WRAPPER FUNCTIONS
-
-The PCRE distribution also contains some C++ wrapper functions and tests,
-applicable to the 8-bit library, which were contributed by Google Inc. On a
-system that can use "configure" and "make", the functions are automatically
-built into a library called pcrecpp. It should be straightforward to compile
-the .cc files manually on other systems. The files called xxx_unittest.cc are
-test programs for each of the corresponding xxx.cc files.
-
-
-BUILDING FOR VIRTUAL PASCAL
-
-A script for building PCRE using Borland's C++ compiler for use with VPASCAL
-was contributed by Alexander Tokarev. Stefan Weber updated the script and added
-additional files. The following files in the distribution are for building PCRE
-for use with VP/Borland: makevp_c.txt, makevp_l.txt, makevp.bat, pcregexp.pas.
-
-
-STACK SIZE IN WINDOWS ENVIRONMENTS
-
-The default processor stack size of 1Mb in some Windows environments is too
-small for matching patterns that need much recursion. In particular, test 2 may
-fail because of this. Normally, running out of stack causes a crash, but there
-have been cases where the test program has just died silently. See your linker
-documentation for how to increase stack size if you experience problems. The
-Linux default of 8Mb is a reasonable choice for the stack, though even that can
-be too small for some pattern/subject combinations.
-
-PCRE has a compile configuration option to disable the use of stack for
-recursion so that heap is used instead. However, pattern matching is
-significantly slower when this is done. There is more about stack usage in the
-"pcrestack" documentation.
-
-
-LINKING PROGRAMS IN WINDOWS ENVIRONMENTS
-
-If you want to statically link a program against a PCRE library in the form of
-a non-dll .a file, you must define PCRE_STATIC before including pcre.h or
-pcrecpp.h, otherwise the pcre_malloc() and pcre_free() exported functions will
-be declared __declspec(dllimport), with unwanted results.
-
-
-CALLING CONVENTIONS IN WINDOWS ENVIRONMENTS
-
-It is possible to compile programs to use different calling conventions using
-MSVC. Search the web for "calling conventions" for more information. To make it
-easier to change the calling convention for the exported functions in the
-PCRE library, the macro PCRE_CALL_CONVENTION is present in all the external
-definitions. It can be set externally when compiling (e.g. in CFLAGS). If it is
-not set, it defaults to empty; the default calling convention is then used
-(which is what is wanted most of the time).
-
-
-COMMENTS ABOUT WIN32 BUILDS (see also "BUILDING PCRE WITH CMAKE" below)
-
-There are two ways of building PCRE using the "configure, make, make install"
-paradigm on Windows systems: using MinGW or using Cygwin. These are not at all
-the same thing; they are completely different from each other. There is also
-support for building using CMake, which some users find a more straightforward
-way of building PCRE under Windows.
-
-The MinGW home page (http://www.mingw.org/) says this:
-
- MinGW: A collection of freely available and freely distributable Windows
- specific header files and import libraries combined with GNU toolsets that
- allow one to produce native Windows programs that do not rely on any
- 3rd-party C runtime DLLs.
-
-The Cygwin home page (http://www.cygwin.com/) says this:
-
- Cygwin is a Linux-like environment for Windows. It consists of two parts:
-
- . A DLL (cygwin1.dll) which acts as a Linux API emulation layer providing
- substantial Linux API functionality
-
- . A collection of tools which provide Linux look and feel.
-
- The Cygwin DLL currently works with all recent, commercially released x86 32
- bit and 64 bit versions of Windows, with the exception of Windows CE.
-
-On both MinGW and Cygwin, PCRE should build correctly using:
-
- ./configure && make && make install
-
-This should create two libraries called libpcre and libpcreposix, and, if you
-have enabled building the C++ wrapper, a third one called libpcrecpp. These are
-independent libraries: when you link with libpcreposix or libpcrecpp you must
-also link with libpcre, which contains the basic functions. (Some earlier
-releases of PCRE included the basic libpcre functions in libpcreposix. This no
-longer happens.)
-
-A user submitted a special-purpose patch that makes it easy to create
-"pcre.dll" under mingw32 using the "msys" environment. It provides "pcre.dll"
-as a special target. If you use this target, no other files are built, and in
-particular, the pcretest and pcregrep programs are not built. An example of how
-this might be used is:
-
- ./configure --enable-utf --disable-cpp CFLAGS="-03 -s"; make pcre.dll
-
-Using Cygwin's compiler generates libraries and executables that depend on
-cygwin1.dll. If a library that is generated this way is distributed,
-cygwin1.dll has to be distributed as well. Since cygwin1.dll is under the GPL
-licence, this forces not only PCRE to be under the GPL, but also the entire
-application. A distributor who wants to keep their own code proprietary must
-purchase an appropriate Cygwin licence.
-
-MinGW has no such restrictions. The MinGW compiler generates a library or
-executable that can run standalone on Windows without any third party dll or
-licensing issues.
-
-But there is more complication:
-
-If a Cygwin user uses the -mno-cygwin Cygwin gcc flag, what that really does is
-to tell Cygwin's gcc to use the MinGW gcc. Cygwin's gcc is only acting as a
-front end to MinGW's gcc (if you install Cygwin's gcc, you get both Cygwin's
-gcc and MinGW's gcc). So, a user can:
-
-. Build native binaries by using MinGW or by getting Cygwin and using
- -mno-cygwin.
-
-. Build binaries that depend on cygwin1.dll by using Cygwin with the normal
- compiler flags.
-
-The test files that are supplied with PCRE are in UNIX format, with LF
-characters as line terminators. Unless your PCRE library uses a default newline
-option that includes LF as a valid newline, it may be necessary to change the
-line terminators in the test files to get some of the tests to work.
-
-BUILDING PCRE ON WINDOWS WITH CMAKE
-
-CMake is an alternative configuration facility that can be used instead of the
-traditional Unix "configure". CMake creates project files (make files, solution
-files, etc.) tailored to numerous development environments, including Visual
-Studio, Borland, Msys, MinGW, NMake, and Unix. If possible, use short paths
-with no spaces in the names for your CMake installation and your pcre
-source and build directories.
-
-The following instructions were contributed by a PCRE user.
-
-1. Install the latest CMake version available from http://www.cmake.org/, and
- ensure that cmake\bin is on your path.
-
-2. Unzip (retaining folder structure) the PCRE source tree into a source
- directory such as C:\pcre. You should ensure your local date and time
- is not earlier than the file dates in your source dir if the release is
- very new.
-
-3. Create a new, empty build directory, preferably a subdirectory of the
- source dir. For example, C:\pcre\pcre-xx\build.
-
-4. Run cmake-gui from the Shell envirornment of your build tool, for example,
- Msys for Msys/MinGW or Visual Studio Command Prompt for VC/VC++.
-
-5. Enter C:\pcre\pcre-xx and C:\pcre\pcre-xx\build for the source and build
- directories, respectively.
-
-6. Hit the "Configure" button.
-
-7. Select the particular IDE / build tool that you are using (Visual
- Studio, MSYS makefiles, MinGW makefiles, etc.)
-
-8. The GUI will then list several configuration options. This is where
- you can enable UTF-8 support or other PCRE optional features.
-
-9. Hit "Configure" again. The adjacent "Generate" button should now be
- active.
-
-10. Hit "Generate".
-
-11. The build directory should now contain a usable build system, be it a
- solution file for Visual Studio, makefiles for MinGW, etc. Exit from
- cmake-gui and use the generated build system with your compiler or IDE.
- E.g., for MinGW you can run "make", or for Visual Studio, open the PCRE
- solution, select the desired configuration (Debug, or Release, etc.) and
- build the ALL_BUILD project.
-
-12. If during configuration with cmake-gui you've elected to build the test
- programs, you can execute them by building the test project. E.g., for
- MinGW: "make test"; for Visual Studio build the RUN_TESTS project. The
- most recent build configuration is targeted by the tests. A summary of
- test results is presented. Complete test output is subsequently
- available for review in Testing\Temporary under your build dir.
-
-USE OF RELATIVE PATHS WITH CMAKE ON WINDOWS
-
-A PCRE user comments as follows:
-
-I thought that others may want to know the current state of
-CMAKE_USE_RELATIVE_PATHS support on Windows.
-
-Here it is:
--- AdditionalIncludeDirectories is only partially modified (only the
-first path - see below)
--- Only some of the contained file paths are modified - shown below for
-pcre.vcproj
--- It properly modifies
-
-I am sure CMake people can fix that if they want to. Until then one will
-need to replace existing absolute paths in project files with relative
-paths manually (e.g. from VS) - relative to project file location. I did
-just that before being told to try CMAKE_USE_RELATIVE_PATHS. Not a big
-deal.
-
-AdditionalIncludeDirectories="E:\builds\pcre\build;E:\builds\pcre\pcre-7.5;"
-AdditionalIncludeDirectories=".;E:\builds\pcre\pcre-7.5;"
-
-RelativePath="pcre.h">
-RelativePath="pcre_chartables.c">
-RelativePath="pcre_chartables.c.rule">
-
-
-TESTING WITH RUNTEST.BAT
-
-If configured with CMake, building the test project ("make test" or building
-ALL_TESTS in Visual Studio) creates (and runs) pcre_test.bat (and depending
-on your configuration options, possibly other test programs) in the build
-directory. Pcre_test.bat runs RunTest.Bat with correct source and exe paths.
-
-For manual testing with RunTest.bat, provided the build dir is a subdirectory
-of the source directory: Open command shell window. Chdir to the location
-of your pcretest.exe and pcregrep.exe programs. Call RunTest.bat with
-"..\RunTest.Bat" or "..\..\RunTest.bat" as appropriate.
-
-To run only a particular test with RunTest.Bat provide a test number argument.
-
-Otherwise:
-
-1. Copy RunTest.bat into the directory where pcretest.exe and pcregrep.exe
- have been created.
-
-2. Edit RunTest.bat to indentify the full or relative location of
- the pcre source (wherein which the testdata folder resides), e.g.:
-
- set srcdir=C:\pcre\pcre-8.20
-
-3. In a Windows command environment, chdir to the location of your bat and
-exe programs.
-
-4. Run RunTest.bat. Test outputs will automatically be compared to expected
-results, and discrepancies will be identified in the console output.
-
-To independently test the just-in-time compiler, run pcre_jit_test.exe.
-To test pcrecpp, run pcrecpp_unittest.exe, pcre_stringpiece_unittest.exe and
-pcre_scanner_unittest.exe.
-
-BUILDING UNDER WINDOWS WITH BCC5.5
-
-Michael Roy sent these comments about building PCRE under Windows with BCC5.5:
-
- Some of the core BCC libraries have a version of PCRE from 1998 built in,
- which can lead to pcre_exec() giving an erroneous PCRE_ERROR_NULL from a
- version mismatch. I'm including an easy workaround below, if you'd like to
- include it in the non-unix instructions:
-
- When linking a project with BCC5.5, pcre.lib must be included before any of
- the libraries cw32.lib, cw32i.lib, cw32mt.lib, and cw32mti.lib on the command
- line.
-
-
-BUILDING UNDER WINDOWS CE WITH VISUAL STUDIO 200x
-
-Vincent Richomme sent a zip archive of files to help with this process. They
-can be found in the file "pcre-vsbuild.zip" in the Contrib directory of the FTP
-site.
-
-
-BUILDING PCRE ON OPENVMS
-
-Dan Mooney sent the following comments about building PCRE on OpenVMS. They
-relate to an older version of PCRE that used fewer source files, so the exact
-commands will need changing. See the current list of source files above.
-
-"It was quite easy to compile and link the library. I don't have a formal
-make file but the attached file [reproduced below] contains the OpenVMS DCL
-commands I used to build the library. I had to add #define
-POSIX_MALLOC_THRESHOLD 10 to pcre.h since it was not defined anywhere.
-
-The library was built on:
-O/S: HP OpenVMS v7.3-1
-Compiler: Compaq C v6.5-001-48BCD
-Linker: vA13-01
-
-The test results did not match 100% due to the issues you mention in your
-documentation regarding isprint(), iscntrl(), isgraph() and ispunct(). I
-modified some of the character tables temporarily and was able to get the
-results to match. Tests using the fr locale did not match since I don't have
-that locale loaded. The study size was always reported to be 3 less than the
-value in the standard test output files."
-
-=========================
-$! This DCL procedure builds PCRE on OpenVMS
-$!
-$! I followed the instructions in the non-unix-use file in the distribution.
-$!
-$ COMPILE == "CC/LIST/NOMEMBER_ALIGNMENT/PREFIX_LIBRARY_ENTRIES=ALL_ENTRIES
-$ COMPILE DFTABLES.C
-$ LINK/EXE=DFTABLES.EXE DFTABLES.OBJ
-$ RUN DFTABLES.EXE/OUTPUT=CHARTABLES.C
-$ COMPILE MAKETABLES.C
-$ COMPILE GET.C
-$ COMPILE STUDY.C
-$! I had to set POSIX_MALLOC_THRESHOLD to 10 in PCRE.H since the symbol
-$! did not seem to be defined anywhere.
-$! I edited pcre.h and added #DEFINE SUPPORT_UTF8 to enable UTF8 support.
-$ COMPILE PCRE.C
-$ LIB/CREATE PCRE MAKETABLES.OBJ, GET.OBJ, STUDY.OBJ, PCRE.OBJ
-$! I had to set POSIX_MALLOC_THRESHOLD to 10 in PCRE.H since the symbol
-$! did not seem to be defined anywhere.
-$ COMPILE PCREPOSIX.C
-$ LIB/CREATE PCREPOSIX PCREPOSIX.OBJ
-$ COMPILE PCRETEST.C
-$ LINK/EXE=PCRETEST.EXE PCRETEST.OBJ, PCRE/LIB, PCREPOSIX/LIB
-$! C programs that want access to command line arguments must be
-$! defined as a symbol
-$ PCRETEST :== "$ SYS$ROADSUSERS:[DMOONEY.REGEXP]PCRETEST.EXE"
-$! Arguments must be enclosed in quotes.
-$ PCRETEST "-C"
-$! Test results:
-$!
-$! The test results did not match 100%. The functions isprint(), iscntrl(),
-$! isgraph() and ispunct() on OpenVMS must not produce the same results
-$! as the system that built the test output files provided with the
-$! distribution.
-$!
-$! The study size did not match and was always 3 less on OpenVMS.
-$!
-$! Locale could not be set to fr
-$!
-=========================
-
-
-BUILDING PCRE ON STRATUS OPENVOS
-
-These notes on the port of PCRE to VOS (lightly edited) were supplied by
-Ashutosh Warikoo, whose email address has the local part awarikoo and the
-domain nse.co.in. The port was for version 7.9 in August 2009.
-
-1. Building PCRE
-
-I built pcre on OpenVOS Release 17.0.1at using GNU Tools 3.4a without any
-problems. I used the following packages to build PCRE:
-
- ftp://ftp.stratus.com/pub/vos/posix/ga/posix.save.evf.gz
-
-Please read and follow the instructions that come with these packages. To start
-the build of pcre, from the root of the package type:
-
- ./build.sh
-
-2. Installing PCRE
-
-Once you have successfully built PCRE, login to the SysAdmin group, switch to
-the root user, and type
-
- [ !create_dir (master_disk)>usr --if needed ]
- [ !create_dir (master_disk)>usr>local --if needed ]
- !gmake install
-
-This installs PCRE and its man pages into /usr/local. You can add
-(master_disk)>usr>local>bin to your command search paths, or if you are in
-BASH, add /usr/local/bin to the PATH environment variable.
-
-4. Restrictions
-
-This port requires readline library optionally. However during the build I
-faced some yet unexplored errors while linking with readline. As it was an
-optional component I chose to disable it.
-
-5. Known Problems
-
-I ran the test suite, but you will have to be your own judge of whether this
-command, and this port, suits your purposes. If you find any problems that
-appear to be related to the port itself, please let me know. Please see the
-build.log file in the root of the package also.
-
-
-=========================
-Last Updated: 30 December 2011
-****
+####
View
260 deps/libmagic/pcre/README
@@ -18,11 +18,12 @@ The contents of this README file are:
The PCRE APIs
Documentation for PCRE
Contributions by users of PCRE
- Building PCRE on non-Unix systems
- Building PCRE on Unix-like systems
- Retrieving configuration information on Unix-like systems
- Shared libraries on Unix-like systems
- Cross-compiling on Unix-like systems
+ Building PCRE on non-Unix-like systems
+ Building PCRE without using autotools
+ Building PCRE using autotools
+ Retrieving configuration information
+ Shared libraries
+ Cross-compiling using autotools
Using HP's ANSI C++ compiler (aCC)
Using PCRE from MySQL
Making new tarballs
@@ -34,9 +35,10 @@ The contents of this README file are:
The PCRE APIs
-------------
-PCRE is written in C, and it has its own API. There are two sets of functions,
-one for the 8-bit library, which processes strings of bytes, and one for the
-16-bit library, which processes strings of 16-bit values. The distribution also
+PCRE is written in C, and it has its own API. There are three sets of functions,
+one for the 8-bit library, which processes strings of bytes, one for the
+16-bit library, which processes strings of 16-bit values, and one for the 32-bit
+library, which processes strings of 32-bit values. The distribution also
includes a set of C++ wrapper functions (see the pcrecpp man page for details),
courtesy of Google Inc., which can be used to call the 8-bit PCRE library from
C++.
@@ -109,36 +111,45 @@ Windows (I myself do not use Windows). Nowadays there is more Windows support
in the standard distribution, so these contibutions have been archived.
-Building PCRE on non-Unix systems
----------------------------------
+Building PCRE on non-Unix-like systems
+--------------------------------------
+
+For a non-Unix-like system, please read the comments in the file
+NON-AUTOTOOLS-BUILD, though if your system supports the use of "configure" and
+"make" you may be able to build PCRE using autotools in the same way as for
+many Unix-like systems.
-For a non-Unix system, please read the comments in the file NON-UNIX-USE,
-though if your system supports the use of "configure" and "make" you may be
-able to build PCRE in the same way as for Unix-like systems. PCRE can also be
-configured in many platform environments using the GUI facility provided by
-CMake's cmake-gui command. This creates Makefiles, solution files, etc.
+PCRE can also be configured using the GUI facility provided by CMake's
+cmake-gui command. This creates Makefiles, solution files, etc. The file
+NON-AUTOTOOLS-BUILD has information about CMake.
PCRE has been compiled on many different operating systems. It should be
straightforward to build PCRE on any system that has a Standard C compiler and
library, because it uses only Standard C functions.
-Building PCRE on Unix-like systems
-----------------------------------
+Building PCRE without using autotools
+-------------------------------------
+
+The use of autotools (in particular, libtool) is problematic in some
+environments, even some that are Unix or Unix-like. See the NON-AUTOTOOLS-BUILD
+file for ways of building PCRE without using autotools.
+
+
+Building PCRE using autotools
+-----------------------------
If you are using HP's ANSI C++ compiler (aCC), please see the special note
in the section entitled "Using HP's ANSI C++ compiler (aCC)" below.
-The following instructions assume the use of the widely used "configure, make,
-make install" process. There is also support for CMake in the PCRE
-distribution; there are some comments about using CMake in the NON-UNIX-USE
-file, though it can also be used in Unix-like systems.
+The following instructions assume the use of the widely used "configure; make;
+make install" (autotools) process.
-To build PCRE on a Unix-like system, first run the "configure" command from the
-PCRE distribution directory, with your current directory set to the directory
-where you want the files to be created. This command is a standard GNU
-"autoconf" configuration script, for which generic instructions are supplied in
-the file INSTALL.
+To build PCRE on system that supports autotools, first run the "configure"
+command from the PCRE distribution directory, with your current directory set
+to the directory where you want the files to be created. This command is a
+standard GNU "autoconf" configuration script, for which generic instructions
+are supplied in the file INSTALL.
Most commonly, people build PCRE within its own distribution directory, and in
this case, on many systems, just running "./configure" is sufficient. However,
@@ -173,8 +184,10 @@ library. They are also documented in the pcrebuild man page.
(See also "Shared libraries on Unix-like systems" below.)
. By default, only the 8-bit library is built. If you add --enable-pcre16 to
- the "configure" command, the 16-bit library is also built. If you want only
- the 16-bit library, use "./configure --enable-pcre16 --disable-pcre8".
+ the "configure" command, the 16-bit library is also built. If you add
+ --enable-pcre32 to the "configure" command, the 32-bit library is also built.
+ If you want only the 16-bit or 32-bit library, use --disable-pcre8 to disable
+ building the 8-bit library.
. If you are building the 8-bit library and want to suppress the building of
the C++ wrapper library, you can add --disable-cpp to the "configure"
@@ -193,23 +206,24 @@ library. They are also documented in the pcrebuild man page.
. If you want to make use of the support for UTF-8 Unicode character strings in
the 8-bit library, or UTF-16 Unicode character strings in the 16-bit library,
- you must add --enable-utf to the "configure" command. Without it, the code
- for handling UTF-8 and UTF-16 is not included in the relevant library. Even
+ or UTF-32 Unicode character strings in the 32-bit library, you must add
+ --enable-utf to the "configure" command. Without it, the code for handling
+ UTF-8, UTF-16 and UTF-8 is not included in the relevant library. Even
when --enable-utf is included, the use of a UTF encoding still has to be
enabled by an option at run time. When PCRE is compiled with this option, its
- input can only either be ASCII or UTF-8/16, even when running on EBCDIC
+ input can only either be ASCII or UTF-8/16/32, even when running on EBCDIC
platforms. It is not possible to use both --enable-utf and --enable-ebcdic at
the same time.
-. There are no separate options for enabling UTF-8 and UTF-16 independently
- because that would allow ridiculous settings such as requesting UTF-16
- support while building only the 8-bit library. However, the option
+. There are no separate options for enabling UTF-8, UTF-16 and UTF-32
+ independently because that would allow ridiculous settings such as requesting
+ UTF-16 support while building only the 8-bit library. However, the option
--enable-utf8 is retained for backwards compatibility with earlier releases
- that did not support 16-bit character strings. It is synonymous with
+ that did not support 16-bit or 32-bit character strings. It is synonymous with
--enable-utf. It is not possible to configure one library with UTF support
and the other without in the same configuration.
-. If, in addition to support for UTF-8/16 character strings, you want to
+. If, in addition to support for UTF-8/16/32 character strings, you want to
include support for the \P, \p, and \X sequences that recognize Unicode
character properties, you must add --enable-unicode-properties to the
"configure" command. This adds about 30K to the size of the library (in the
@@ -271,7 +285,8 @@ library. They are also documented in the pcrebuild man page.
library, PCRE then uses three bytes instead of two for offsets to different
parts of the compiled pattern. In the 16-bit library, --with-link-size=3 is
the same as --with-link-size=4, which (in both libraries) uses four-byte
- offsets. Increasing the internal link size reduces performance.
+ offsets. Increasing the internal link size reduces performance. In the 32-bit
+ library, the only supported link size is 4.
. You can build PCRE so that its internal match() function that is called from
pcre_exec() does not call itself recursively. Instead, it uses memory blocks
@@ -300,13 +315,34 @@ library. They are also documented in the pcrebuild man page.
pcre_chartables.c.dist. See "Character tables" below for further information.
. It is possible to compile PCRE for use on systems that use EBCDIC as their
- character code (as opposed to ASCII) by specifying
+ character code (as opposed to ASCII/Unicode) by specifying
--enable-ebcdic
This automatically implies --enable-rebuild-chartables (see above). However,
when PCRE is built this way, it always operates in EBCDIC. It cannot support
- both EBCDIC and UTF-8/16.
+ both EBCDIC and UTF-8/16/32. There is a second option, --enable-ebcdic-nl25,
+ which specifies that the code value for the EBCDIC NL character is 0x25
+ instead of the default 0x15.
+
+. In environments where valgrind is installed, if you specify
+
+ --enable-valgrind
+
+ PCRE will use valgrind annotations to mark certain memory regions as
+ unaddressable. This allows it to detect invalid memory accesses, and is
+ mostly useful for debugging PCRE itself.
+
+. In environments where the gcc compiler is used and lcov version 1.6 or above
+ is installed, if you specify
+
+ --enable-coverage
+
+ the build process implements a code coverage report for the test suite. The
+ report is generated by running "make coverage". If ccache is installed on
+ your system, it must be disabled when building PCRE for coverage reporting.
+ You can do this by setting the environment variable CCACHE_DISABLE=1 before
+ running "make" to build PCRE.
. The pcregrep program currently supports only 8-bit data files, and so
requires the 8-bit PCRE library. It is possible to compile pcregrep to use
@@ -326,16 +362,17 @@ library. They are also documented in the pcrebuild man page.
The default value is 20K.
. It is possible to compile pcretest so that it links with the libreadline
- library, by specifying
+ or libedit libraries, by specifying, respectively,
- --enable-pcretest-libreadline
+ --enable-pcretest-libreadline or --enable-pcretest-libedit
If this is done, when pcretest's input is from a terminal, it reads it using
the readline() function. This provides line-editing and history facilities.
Note that libreadline is GPL-licenced, so if you distribute a binary of
- pcretest linked in this way, there may be licensing issues.
+ pcretest linked in this way, there may be licensing issues. These can be
+ avoided by linking with libedit (which has a BSD licence) instead.
- Setting this option causes the -lreadline option to be added to the pcretest
+ Enabling libreadline causes the -lreadline option to be added to the pcretest
build. In many operating environments with a sytem-installed readline
library this is sufficient. However, in some environments (e.g. if an
unmodified distribution version of readline is in use), it may be necessary
@@ -355,10 +392,9 @@ The "configure" script builds the following files for the basic C library:
that were set for "configure"
. libpcre.pc ) data for the pkg-config command
. libpcre16.pc )
+. libpcre32.pc )
. libpcreposix.pc )
. libtool script that builds shared and/or static libraries
-. RunTest script for running tests on the basic C library
-. RunGrepTest script for running tests on the pcregrep command
Versions of config.h and pcre.h are distributed in the PCRE tarballs under the
names config.h.generic and pcre.h.generic. These are provided for those who
@@ -376,8 +412,8 @@ The "configure" script also creates config.status, which is an executable
script that can be run to recreate the configuration, and config.log, which
contains compiler output from tests that "configure" runs.
-Once "configure" has run, you can run "make". This builds either or both of the
-libraries libpcre and libpcre16, and a test program called pcretest. If you
+Once "configure" has run, you can run "make". This builds the the libraries
+libpcre, libpcre16 and/or libpcre32, and a test program called pcretest. If you
enabled JIT support with --enable-jit, a test program called pcre_jit_test is
built as well.
@@ -401,12 +437,14 @@ system. The following are installed (file names are all relative to the
Libraries (lib):
libpcre16 (if 16-bit support is enabled)
+ libpcre32 (if 32-bit support is enabled)
libpcre (if 8-bit support is enabled)
libpcreposix (if 8-bit support is enabled)
libpcrecpp (if 8-bit and C++ support is enabled)
Configuration information (lib/pkgconfig):
libpcre16.pc
+ libpcre32.pc
libpcre.pc
libpcreposix.pc
libpcrecpp.pc (if C++ support is enabled)
@@ -447,8 +485,8 @@ This removes all the files that "make install" installed. However, it does not
remove any directories, because these are often shared with other programs.
-Retrieving configuration information on Unix-like systems
----------------------------------------------------------
+Retrieving configuration information
+------------------------------------
Running "make install" installs the command pcre-config, which can be used to
recall information about the PCRE configuration and installation. For example:
@@ -473,8 +511,8 @@ The data is held in *.pc files that are installed in a directory called
<prefix>/lib/pkgconfig.
-Shared libraries on Unix-like systems
--------------------------------------
+Shared libraries
+----------------
The default distribution builds PCRE as shared libraries and static libraries,
as long as the operating system supports shared libraries. Shared library
@@ -499,8 +537,8 @@ Then run "make" in the usual way. Similarly, you can use --disable-static to
build only shared libraries.
-Cross-compiling on Unix-like systems
-------------------------------------
+Cross-compiling using autotools
+-------------------------------
You can specify CC and CFLAGS in the normal way to the "configure" command, in
order to cross-compile PCRE for some other host. However, you should NOT
@@ -572,21 +610,22 @@ script creates the .txt and HTML forms of the documentation from the man pages.
Testing PCRE
------------
-To test the basic PCRE library on a Unix system, run the RunTest script that is
-created by the configuring process. There is also a script called RunGrepTest
-that tests the options of the pcregrep command. If the C++ wrapper library is
-built, three test programs called pcrecpp_unittest, pcre_scanner_unittest, and
-pcre_stringpiece_unittest are also built. When JIT support is enabled, another
-test program called pcre_jit_test is built.
+To test the basic PCRE library on a Unix-like system, run the RunTest script.
+There is another script called RunGrepTest that tests the options of the
+pcregrep command. If the C++ wrapper library is built, three test programs
+called pcrecpp_unittest, pcre_scanner_unittest, and pcre_stringpiece_unittest
+are also built. When JIT support is enabled, another test program called
+pcre_jit_test is built.
Both the scripts and all the program tests are run if you obey "make check" or
-"make test". For other systems, see the instructions in NON-UNIX-USE.
+"make test". For other environments, see the instructions in
+NON-AUTOTOOLS-BUILD.
The RunTest script runs the pcretest test program (which is documented in its
own man page) on each of the relevant testinput files in the testdata
directory, and compares the output with the contents of the corresponding
testoutput files. Some tests are relevant only when certain build-time options
-were selected. For example, the tests for UTF-8/16 support are run only if
+were selected. For example, the tests for UTF-8/16/32 support are run only if
--enable-utf was used. RunTest outputs a comment when it skips a test.
Many of the tests that are not skipped are run up to three times. The second
@@ -595,9 +634,9 @@ tests that are marked "never study" (see the pcretest program for how this is
done). If JIT support is available, the non-DFA tests are run a third time,
this time with a forced pcre_study() with the PCRE_STUDY_JIT_COMPILE option.
-When both 8-bit and 16-bit support is enabled, the entire set of tests is run
-twice, once for each library. If you want to run just one set of tests, call
-RunTest with either the -8 or -16 option.
+The entire set of tests is run once for each of the 8-bit, 16-bit and 32-bit
+libraries that are enabled. If you want to run just one set of tests, call
+RunTest with either the -8, -16 or -32 option.
RunTest uses a file called testtry to hold the main output from pcretest.
Other files whose names begin with "test" are used as working files in some
@@ -606,6 +645,9 @@ numbers as arguments to RunTest, for example:
RunTest 2 7 11
+You can also call RunTest with the single argument "list" to cause it to output
+a list of tests.
+
The first test file can be fed directly into the perltest.pl script to check
that Perl gives the same results. The only difference you should see is in the
first few lines, where the Perl version is given instead of the PCRE version.
@@ -645,13 +687,13 @@ RunTest.bat. The version of RunTest.bat included with PCRE 7.4 and above uses
Windows versions of test 2. More info on using RunTest.bat is included in the
document entitled NON-UNIX-USE.]
-The fourth and fifth tests check the UTF-8/16 support and error handling and
+The fourth and fifth tests check the UTF-8/16/32 support and error handling and
internal UTF features of PCRE that are not relevant to Perl, respectively. The
sixth and seventh tests do the same for Unicode character properties support.
The eighth, ninth, and tenth tests check the pcre_dfa_exec() alternative
-matching function, in non-UTF-8/16 mode, UTF-8/16 mode, and UTF-8/16 mode with
-Unicode property support, respectively.
+matching function, in non-UTF-8/16/32 mode, UTF-8/16/32 mode, and UTF-8/16/32
+mode with Unicode property support, respectively.
The eleventh test checks some internal offsets and code size features; it is
run only when the default "link size" of 2 is set (in other cases the sizes
@@ -662,16 +704,21 @@ test is run only when JIT support is not available. They test some JIT-specific
features such as information output from pcretest about JIT compilation.
The fourteenth, fifteenth, and sixteenth tests are run only in 8-bit mode, and
-the seventeenth, eighteenth, and nineteenth tests are run only in 16-bit mode.
+the seventeenth, eighteenth, and nineteenth tests are run only in 16/32-bit mode.
These are tests that generate different output in the two modes. They are for
-general cases, UTF-8/16 support, and Unicode property support, respectively.
+general cases, UTF-8/16/32 support, and Unicode property support, respectively.
+
+The twentieth test is run only in 16/32-bit mode. It tests some specific
+16/32-bit features of the DFA matching engine.
-The twentieth test is run only in 16-bit mode. It tests some specific 16-bit
-features of the DFA matching engine.
+The twenty-first and twenty-second tests are run only in 16/32-bit mode, when the
+link size is set to 2 for the 16-bit library. They test reloading pre-compiled patterns.
-The twenty-first and twenty-second tests are run only in 16-bit mode, when the
-link size is set to 2. They test reloading pre-compiled patterns.
+The twenty-third and twenty-fourth tests are run only in 16-bit mode. They are for
+general cases, and UTF-16 support, respectively.
+The twenty-fifth and twenty-sixth tests are run only in 32-bit mode. They are for
+general cases, and UTF-32 support, respectively.
Character tables
----------------
@@ -731,8 +778,8 @@ File manifest
-------------
The distribution should contain the files listed below. Where a file name is
-given as pcre[16]_xxx it means that there are two files, one with the name
-pcre_xxx and the other with the name pcre16_xxx.
+given as pcre[16|32]_xxx it means that there are three files, one with the name
+pcre_xxx, one with the name pcre16_xx, and a third with the name pcre32_xxx.
(A) Source files of the PCRE library functions and their headers:
@@ -743,33 +790,35 @@ pcre_xxx and the other with the name pcre16_xxx.
coding; used, unless --enable-rebuild-chartables is
specified, by copying to pcre[16]_chartables.c
- pcreposix.c )
- pcre[16]_byte_order.c )
- pcre[16]_compile.c )
- pcre[16]_config.c )
- pcre[16]_dfa_exec.c )
- pcre[16]_exec.c )
- pcre[16]_fullinfo.c )
- pcre[16]_get.c ) sources for the functions in the library,
- pcre[16]_globals.c ) and some internal functions that they use
- pcre[16]_jit_compile.c )
- pcre[16]_maketables.c )
- pcre[16]_newline.c )
- pcre[16]_refcount.c )
- pcre[16]_string_utils.c )
- pcre[16]_study.c )
- pcre[16]_tables.c )
- pcre[16]_ucd.c )
- pcre[16]_version.c )
- pcre[16]_xclass.c )
- pcre_ord2utf8.c )
- pcre_valid_utf8.c )
- pcre16_ord2utf16.c )
- pcre16_utf16_utils.c )
- pcre16_valid_utf16.c )
-
- pcre[16]_printint.c ) debugging function that is used by pcretest,
- ) and can also be #included in pcre_compile()
+ pcreposix.c )
+ pcre[16|32]_byte_order.c )
+ pcre[16|32]_compile.c )
+ pcre[16|32]_config.c )
+ pcre[16|32]_dfa_exec.c )
+ pcre[16|32]_exec.c )
+ pcre[16|32]_fullinfo.c )
+ pcre[16|32]_get.c ) sources for the functions in the library,
+ pcre[16|32]_globals.c ) and some internal functions that they use
+ pcre[16|32]_jit_compile.c )
+ pcre[16|32]_maketables.c )
+ pcre[16|32]_newline.c )
+ pcre[16|32]_refcount.c )
+ pcre[16|32]_string_utils.c )
+ pcre[16|32]_study.c )
+ pcre[16|32]_tables.c )
+ pcre[16|32]_ucd.c )
+ pcre[16|32]_version.c )
+ pcre[16|32]_xclass.c )
+ pcre_ord2utf8.c )
+ pcre_valid_utf8.c )
+ pcre16_ord2utf16.c )
+ pcre16_utf16_utils.c )
+ pcre16_valid_utf16.c )
+ pcre32_utf32_utils.c )
+ pcre32_valid_utf32.c )
+
+ pcre[16|32]_printint.c ) debugging function that is used by pcretest,
+ ) and can also be #included in pcre_compile()
pcre.h.in template for pcre.h when built by "configure"
pcreposix.h header for the external POSIX wrapper API
@@ -811,7 +860,8 @@ pcre_xxx and the other with the name pcre16_xxx.
Makefile.am ) the automake input that was used to create
) Makefile.in
NEWS important changes in this release
- NON-UNIX-USE notes on building PCRE on non-Unix systems
+ NON-UNIX-USE the previous name for NON-AUTOTOOLS-BUILD
+ NON-AUTOTOOLS-BUILD notes on building PCRE without using autotools
PrepareRelease script to make preparations for "make dist"
README this file
RunTest a Unix shell script for running tests
@@ -833,6 +883,7 @@ pcre_xxx and the other with the name pcre16_xxx.
doc/perltest.txt plain text documentation of Perl test program
install-sh a shell script for installing files
libpcre16.pc.in template for libpcre16.pc for pkg-config
+ libpcre32.pc.in template for libpcre32.pc for pkg-config
libpcre.pc.in template for libpcre.pc for pkg-config
libpcreposix.pc.in template for libpcreposix.pc for pkg-config
libpcrecpp.pc.in template for libpcrecpp.pc for pkg-config
@@ -855,6 +906,7 @@ pcre_xxx and the other with the name pcre16_xxx.
cmake/COPYING-CMAKE-SCRIPTS
cmake/FindPackageHandleStandardArgs.cmake
+ cmake/FindEditline.cmake
cmake/FindReadline.cmake
CMakeLists.txt
config-cmake.h.in
@@ -880,4 +932,4 @@ pcre_xxx and the other with the name pcre16_xxx.
Philip Hazel
Email local part: ph10
Email domain: cam.ac.uk
-Last updated: 20 January 2012
+Last updated: 27 October 2012
View
279 deps/libmagic/pcre/config/freebsd/config.h
@@ -1,279 +0,0 @@
-/* On Unix-like systems config.h.in is converted by "configure" into config.h.
-Some other environments also support the use of "configure". PCRE is written in
-Standard C, but there are a few non-standard things it can cope with, allowing
-it to run on SunOS4 and other "close to standard" systems.
-
-If you are going to build PCRE "by hand" on a system without "configure" you
-should copy the distributed config.h.generic to config.h, and then set up the
-macro definitions the way you need them. You must then add -DHAVE_CONFIG_H to
-all of your compile commands, so that config.h is included at the start of
-every source.
-
-Alternatively, you can avoid editing by using -D on the compiler command line
-to set the macro values. In this case, you do not have to set -DHAVE_CONFIG_H.
-
-PCRE uses memmove() if HAVE_MEMMOVE is set to 1; otherwise it uses bcopy() if
-HAVE_BCOPY is set to 1. If your system has neither bcopy() nor memmove(), set
-them both to 0; an emulation function will be used. */
-
-/* By default, the \R escape sequence matches any Unicode line ending
- character or sequence of characters. If BSR_ANYCRLF is defined, this is
- changed so that backslash-R matches only CR, LF, or CRLF. The build- time
- default can be overridden by the user of PCRE at runtime. On systems that
- support it, "configure" can be used to override the default. */
-/* #undef BSR_ANYCRLF */
-
-/* If you are compiling for a system that uses EBCDIC instead of ASCII
- character codes, define this macro as 1. On systems that can use
- "configure", this can be done via --enable-ebcdic. PCRE will then assume
- that all input strings are in EBCDIC. If you do not define this macro, PCRE
- will assume input strings are ASCII or UTF-8/16 Unicode. It is not possible
- to build a version of PCRE that supports both EBCDIC and UTF-8/16. */
-/* #undef EBCDIC */
-
-/* Define to 1 if you have the `bcopy' function. */
-#define HAVE_BCOPY 1
-
-/* Define to 1 if you have the <bits/type_traits.h> header file. */
-/* #undef HAVE_BITS_TYPE_TRAITS_H */
-
-/* Define to 1 if you have the <bzlib.h> header file. */
-#define HAVE_BZLIB_H 1
-
-/* Define to 1 if you have the <dirent.h> header file. */
-#define HAVE_DIRENT_H 1
-
-/* Define to 1 if you have the <dlfcn.h> header file. */
-#define HAVE_DLFCN_H 1
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#define HAVE_INTTYPES_H 1
-
-/* Define to 1 if you have the <limits.h> header file. */
-#define HAVE_LIMITS_H 1
-
-/* Define to 1 if the system has the type `long long'. */
-#define HAVE_LONG_LONG 1
-
-/* Define to 1 if you have the `memmove' function. */
-#define HAVE_MEMMOVE 1
-
-/* Define to 1 if you have the <memory.h> header file. */
-#define HAVE_MEMORY_H 1
-
-/* Define to 1 if you have the <readline/history.h> header file. */
-#define HAVE_READLINE_HISTORY_H 1
-
-/* Define to 1 if you have the <readline/readline.h> header file. */
-#define HAVE_READLINE_READLINE_H 1
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#define HAVE_STDINT_H 1
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#define HAVE_STDLIB_H 1
-
-/* Define to 1 if you have the `strerror' function. */
-#define HAVE_STRERROR 1
-
-/* Define to 1 if you have the <string> header file. */
-#define HAVE_STRING 1
-
-/* Define to 1 if you have the <strings.h> header file. */
-#define HAVE_STRINGS_H 1
-
-/* Define to 1 if you have the <string.h> header file. */
-#define HAVE_STRING_H 1
-
-/* Define to 1 if you have `strtoimax'. */
-/* #undef HAVE_STRTOIMAX */
-
-/* Define to 1 if you have `strtoll'. */
-/* #undef HAVE_STRTOLL */
-
-/* Define to 1 if you have `strtoq'. */
-#define HAVE_STRTOQ 1
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#define HAVE_SYS_STAT_H 1
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#define HAVE_SYS_TYPES_H 1
-
-/* Define to 1 if you have the <type_traits.h> header file. */
-/* #undef HAVE_TYPE_TRAITS_H */
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#define HAVE_UNISTD_H 1
-
-/* Define to 1 if the system has the type `unsigned long long'. */
-#define HAVE_UNSIGNED_LONG_LONG 1
-
-/* Define to 1 if you have the <windows.h> header file. */
-/* #undef HAVE_WINDOWS_H */
-
-/* Define to 1 if you have the <zlib.h> header file. */
-#undef HAVE_ZLIB_H
-
-/* Define to 1 if you have `_strtoi64'. */
-/* #undef HAVE__STRTOI64 */
-
-/* The value of LINK_SIZE determines the number of bytes used to store links
- as offsets within the compiled regex. The default is 2, which allows for
- compiled patterns up to 64K long. This covers the vast majority of cases.
- However, PCRE can also be compiled to use 3 or 4 bytes instead. This allows
- for longer patterns in extreme cases. On systems that support it,
- "configure" can be used to override this default. */
-#define LINK_SIZE 2
-
-/* Define to the sub-directory in which libtool stores uninstalled libraries.
- */
-#define LT_OBJDIR ".libs/"
-
-/* The value of MATCH_LIMIT determines the default number of times the
- internal match() function can be called during a single execution of
- pcre_exec(). There is a runtime interface for setting a different limit.
- The limit exists in order to catch runaway regular expressions that take
- for ever to determine that they do not match. The default is set very large
- so that it does not accidentally catch legitimate cases. On systems that
- support it, "configure" can be used to override this default default. */
-#define MATCH_LIMIT 10000000
-
-/* The above limit applies to all calls of match(), whether or not they
- increase the recursion depth. In some environments it is desirable to limit
- the depth of recursive calls of match() more strictly, in order to restrict
- the maximum amount of stack (or heap, if NO_RECURSE is defined) that is
- used. The value of MATCH_LIMIT_RECURSION applies only to recursive calls of
- match(). To have any useful effect, it must be less than the value of
- MATCH_LIMIT. The default is to use the same value as MATCH_LIMIT. There is
- a runtime method for setting a different limit. On systems that support it,
- "configure" can be used to override the default. */
-#define MATCH_LIMIT_RECURSION MATCH_LIMIT
-
-/* This limit is parameterized just in case anybody ever wants to change it.
- Care must be taken if it is increased, because it guards against integer
- overflow caused by enormously large patterns. */
-#define MAX_NAME_COUNT 10000
-
-/* This limit is parameterized just in case anybody ever wants to change it.
- Care must be taken if it is increased, because it guards against integer
- overflow caused by enormously large patterns. */
-#define MAX_NAME_SIZE 32
-
-/* The value of NEWLINE determines the newline character sequence. On systems
- that support it, "configure" can be used to override the default, which is
- 10. The possible values are 10 (LF), 13 (CR), 3338 (CRLF), -1 (ANY), or -2
- (ANYCRLF). */
-#define NEWLINE 10
-
-/* PCRE uses recursive function calls to handle backtracking while matching.
- This can sometimes be a problem on systems that have stacks of limited
- size. Define NO_RECURSE to get a version that doesn't use recursion in the
- match() function; instead it creates its own stack by steam using
- pcre_recurse_malloc() to obtain memory from the heap. For more detail, see
- the comments and other stuff just above the match() function. On systems
- that support it, "configure" can be used to set this in the Makefile (use
- --disable-stack-for-recursion). */
-/* #undef NO_RECURSE */
-
-/* Name of package */
-#define PACKAGE "pcre"
-
-/* Define to the address where bug reports for this package should be sent. */
-#define PACKAGE_BUGREPORT ""
-
-/* Define to the full name of this package. */
-#define PACKAGE_NAME "PCRE"
-
-/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "PCRE 8.30"
-
-/* Define to the one symbol short name of this package. */
-#define PACKAGE_TARNAME "pcre"
-
-/* Define to the home page for this package. */
-#define PACKAGE_URL ""
-
-/* Define to the version of this package. */
-#define PACKAGE_VERSION "8.30"
-
-/* The value of PCREGREP_BUFSIZE determines the size of buffer used by
- pcregrep to hold parts of the file it is searching. On systems that support
- it, "configure" can be used to override the default, which is 8192. This is
- also the minimum value. The actual amount of memory used by pcregrep is
- three times this number, because it allows for the buffering of "before"
- and "after" lines. */
-#define PCREGREP_BUFSIZE 20480
-
-
-/* If you are compiling for a system other than a Unix-like system or
- Win32, and it needs some magic to be inserted before the definition
- of a function that is exported by the library, define this macro to
- contain the relevant magic. If you do not define this macro, it
- defaults to "extern" for a C compiler and "extern C" for a C++
- compiler on non-Win32 systems. This macro apears at the start of
- every exported function that is part of the external API. It does
- not appear on functions that are "external" in the C sense, but
- which are internal to the library. */
-/* #undef PCRE_EXP_DEFN */
-
-/* Define if linking statically (TODO: make nice with Libtool) */
-/* #undef PCRE_STATIC */
-
-/* When calling PCRE via the POSIX interface, additional working storage is
- required for holding the pointers to capturing substrings because PCRE
- requires three integers per substring, whereas the POSIX interface provides
- only two. If the number of expected substrings is small, the wrapper
- function uses space on the stack, because this is faster than using
- malloc() for each call. The threshold above which the stack is no longer
- used is defined by POSIX_MALLOC_THRESHOLD. On systems that support it,
- "configure" can be used to override this default. */
-#define POSIX_MALLOC_THRESHOLD 10
-
-/* Define to 1 if you have the ANSI C header files. */
-#define STDC_HEADERS 1
-
-/* Define to enable support for Just-In-Time compiling. */
-/* #undef SUPPORT_JIT */
-
-/* Define to allow pcregrep to be linked with libbz2, so that it is able to
- handle .bz2 files. */
-/* #undef SUPPORT_LIBBZ2 */
-
-/* Define to allow pcretest to be linked with libreadline. */
-/* #undef SUPPORT_LIBREADLINE */
-
-/* Define to allow pcregrep to be linked with libz, so that it is able to
- handle .gz files. */
-/* #undef SUPPORT_LIBZ */
-
-/* Define to enable the 16 bit PCRE library. */
-/* #undef SUPPORT_PCRE16 */
-
-/* Define to enable the 8 bit PCRE library. */
-#define SUPPORT_PCRE8 /**/
-
-/* Define to enable JIT support in pcregrep. */
-/* #undef SUPPORT_PCREGREP_JIT */
-
-/* Define to enable support for Unicode properties. */
-/* #undef SUPPORT_UCP */
-
-/* Define to enable support for the UTF-8/16 Unicode encoding. This will work
- even in an EBCDIC environment, but it is incompatible with the EBCDIC
- macro. That is, PCRE can support *either* EBCDIC code *or* ASCII/UTF-8/16,
- but not both at once. */
-/* #undef SUPPORT_UTF */
-
-/* Version number of package */
-#define VERSION "8.30"
-
-/* Define to empty if `const' does not conform to ANSI C. */
-/* #undef const */
-
-/* Define to the type of a signed integer type of width exactly 64 bits if
- such a type exists and the standard includes do not define it. */
-/* #undef int64_t */
-
-/* Define to `unsigned int' if <sys/types.h> does not define. */
-/* #undef size_t */
View
209 deps/libmagic/pcre/config/linux/config.h
@@ -1,13 +1,18 @@
-/* On Unix-like systems config.h.in is converted by "configure" into config.h.
-Some other environments also support the use of "configure". PCRE is written in
-Standard C, but there are a few non-standard things it can cope with, allowing
-it to run on SunOS4 and other "close to standard" systems.
+/* config.h. Generated from config.h.in by configure. */
+/* config.h.in. Generated from configure.ac by autoheader. */
-If you are going to build PCRE "by hand" on a system without "configure" you
-should copy the distributed config.h.generic to config.h, and then set up the
-macro definitions the way you need them. You must then add -DHAVE_CONFIG_H to
-all of your compile commands, so that config.h is included at the start of
-every source.
+
+/* PCRE is written in Standard C, but there are a few non-standard things it
+can cope with, allowing it to run on SunOS4 and other "close to standard"
+systems.
+
+In environments that support the facilities, config.h.in is converted by
+"configure", or config-cmake.h.in is converted by CMake, into config.h. If you
+are going to build PCRE "by hand" without using "configure" or CMake, you
+should copy the distributed config.h.generic to config.h, and then edit the
+macro definitions to be the way you need them. You must then add
+-DHAVE_CONFIG_H to all of your compile commands, so that config.h is included
+at the start of every source.
Alternatively, you can avoid editing by using -D on the compiler command line
to set the macro values. In this case, you do not have to set -DHAVE_CONFIG_H.
@@ -17,20 +22,28 @@ HAVE_BCOPY is set to 1. If your system has neither bcopy() nor memmove(), set
them both to 0; an emulation function will be used. */
/* By default, the \R escape sequence matches any Unicode line ending
- character or sequence of characters. If BSR_ANYCRLF is defined, this is
- changed so that backslash-R matches only CR, LF, or CRLF. The build- time
- default can be overridden by the user of PCRE at runtime. On systems that
- support it, "configure" can be used to override the default. */
+ character or sequence of characters. If BSR_ANYCRLF is defined (to any
+ value), this is changed so that backslash-R matches only CR, LF, or CRLF.
+ The build-time default can be overridden by the user of PCRE at runtime. */
/* #undef BSR_ANYCRLF */
/* If you are compiling for a system that uses EBCDIC instead of ASCII
- character codes, define this macro as 1. On systems that can use
- "configure", this can be done via --enable-ebcdic. PCRE will then assume
- that all input strings are in EBCDIC. If you do not define this macro, PCRE
- will assume input strings are ASCII or UTF-8/16 Unicode. It is not possible
- to build a version of PCRE that supports both EBCDIC and UTF-8/16. */
+ character codes, define this macro to any value. You must also edit the
+ NEWLINE macro below to set a suitable EBCDIC newline, commonly 21 (0x15).
+ On systems that can use "configure" or CMake to set EBCDIC, NEWLINE is
+ automatically adjusted. When EBCDIC is set, PCRE assumes that all input
+ strings are in EBCDIC. If you do not define this macro, PCRE will assume
+ input strings are ASCII or UTF-8/16/32 Unicode. It is not possible to build
+ a version of PCRE that supports both EBCDIC and UTF-8/16/32. */
/* #undef EBCDIC */
+/* In an EBCDIC environment, define this macro to any value to arrange for the
+ NL character to be 0x25 instead of the default 0x15. NL plays the role that
+ LF does in an ASCII/Unicode environment. The value must also be set in the
+ NEWLINE macro below. On systems that can use "configure" or CMake to set
+ EBCDIC_NL25, the adjustment of NEWLINE is automatic. */
+/* #undef EBCDIC_NL25 */
+
/* Define to 1 if you have the `bcopy' function. */
#define HAVE_BCOPY 1
@@ -46,6 +59,12 @@ them both to 0; an emulation function will be used. */
/* Define to 1 if you have the <dlfcn.h> header file. */
#define HAVE_DLFCN_H 1
+/* Define to 1 if you have the <editline/readline.h> header file. */
+/* #undef HAVE_EDITLINE_READLINE_H */
+
+/* Define to 1 if you have the <edit/readline/readline.h> header file. */
+/* #undef HAVE_EDIT_READLINE_READLINE_H */
+
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
@@ -61,6 +80,12 @@ them both to 0; an emulation function will be used. */
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
+/* Define if you have POSIX threads libraries and header files. */
+#define HAVE_PTHREAD 1
+
+/* Have PTHREAD_PRIO_INHERIT. */
+/* #undef HAVE_PTHREAD_PRIO_INHERIT */
+
/* Define to 1 if you have the <readline/history.h> header file. */