X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/8ac170f35ed82789928f9e94beaa38991761a88c..6bf342e1eb87c656de34d668d7303a7d0138e89a:/src/src/pcre/dftables.c diff --git a/src/src/pcre/dftables.c b/src/src/pcre/dftables.c index 450a00bf4..bc01eb7f2 100644 --- a/src/src/pcre/dftables.c +++ b/src/src/pcre/dftables.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/pcre/dftables.c,v 1.2 2005/06/15 08:57:10 ph10 Exp $ */ +/* $Cambridge: exim/src/src/pcre/dftables.c,v 1.5 2007/01/23 15:08:45 ph10 Exp $ */ /************************************************* * Perl-Compatible Regular Expressions * @@ -8,7 +8,7 @@ and semantics are as close as possible to those of the Perl 5 language. Written by Philip Hazel - Copyright (c) 1997-2005 University of Cambridge + Copyright (c) 1997-2006 University of Cambridge ----------------------------------------------------------------------------- Redistribution and use in source and binary forms, with or without @@ -68,7 +68,7 @@ if (argc != 2) return 1; } -f = fopen(argv[1], "w"); +f = fopen(argv[1], "wb"); if (f == NULL) { fprintf(stderr, "dftables: failed to open %s for writing\n", argv[1]); @@ -88,7 +88,16 @@ fprintf(f, fprintf(f, "This file contains the default tables for characters with codes less than\n" "128 (ASCII characters). These tables are used when no external tables are\n" - "passed to PCRE. */\n\n" + "passed to PCRE.\n\n"); +fprintf(f, + "The following #include is present because without it gcc 4.x may remove\n" + "the array definition from the final binary if PCRE is built into a static\n" + "library and dead code stripping is activated. This leads to link errors.\n" + "Pulling in the header ensures that the array gets flagged as \"someone\n" + "outside this compilation unit might reference this\" and so it will always\n" + "be supplied to the linker. */\n\n" + "#include \"pcre_internal.h\"\n\n"); +fprintf(f, "const unsigned char _pcre_default_tables[] = {\n\n" "/* This table is a lower casing table. */\n\n");