From c521828d66dbf6331fe585d48aca02b2b1e00146 Mon Sep 17 00:00:00 2001 From: ph10 Date: Tue, 27 Apr 2021 08:36:47 +0000 Subject: Remove real POSIX function names from the pcre2-posix library. git-svn-id: svn://vcs.exim.org/pcre2/code/trunk@1306 6239d852-aaf2-0410-a92c-79f79f948069 --- src/pcre2posix.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/pcre2posix.c b/src/pcre2posix.c index b24620a..32c80c3 100644 --- a/src/pcre2posix.c +++ b/src/pcre2posix.c @@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language. Written by Philip Hazel Original API code Copyright (c) 1997-2012 University of Cambridge - New API code Copyright (c) 2016-2019 University of Cambridge + New API code Copyright (c) 2016-2021 University of Cambridge ----------------------------------------------------------------------------- Redistribution and use in source and binary forms, with or without @@ -175,6 +175,20 @@ static const char *const pstring[] = { +#if 0 /* REMOVE THIS CODE */ + +The code below was created for 10.33 (see ChangeLog 10.33 #4) when the +POSIX functions were given pcre2_... names instead of the traditional POSIX +names. However, it has proved to be more troublesome than useful. There have +been at least two cases where a program links with two others, one of which +uses the POSIX library and the other uses the PCRE2 POSIX functions, thus +causing two instances of the POSIX runctions to exist, leading to trouble. For +10.37 this code is commented out. In due course it can be removed if there are +no issues. The only small worry is the comment below about languages that do +not include pcre2posix.h. If there are any such cases, they will have to use +the PCRE2 names. + + /************************************************* * Wrappers with traditional POSIX names * *************************************************/ @@ -218,7 +232,7 @@ regexec(const regex_t *preg, const char *string, size_t nmatch, { return pcre2_regexec(preg, string, nmatch, pmatch, eflags); } - +#endif /************************************************* -- cgit v1.2.1