SCP: Avoid broken regular expression APIs
If libpcreposix isn't available, we can't fall back to the local regex.h since the default C runtime on Linux and OS/X implementations of the regex functionality doesn't ever match regular expressions with imbedded newlines.
This commit is contained in:
parent
9185a3d8f0
commit
714f0a445b
2 changed files with 0 additions and 13 deletions
10
makefile
10
makefile
|
@ -504,16 +504,6 @@ ifeq ($(WIN32),) #*nix Environments (&& cygwin)
|
|||
endif
|
||||
endif
|
||||
endif
|
||||
ifeq (,$(findstring DHAVE_PCREPOSIX_H,$(OS_CCDEFS)))
|
||||
# If libpcreposix isn't available, fall back to the local regex.h
|
||||
# Presume that the local regex support is available in the C runtime
|
||||
# without a specific reference to a library. This may not be true on
|
||||
# some platforms.
|
||||
ifneq (,$(call find_include,regex))
|
||||
OS_CCDEFS += -DHAVE_REGEX_H
|
||||
$(info using regex: $(call find_include,regex))
|
||||
endif
|
||||
endif
|
||||
# Find available ncurses library.
|
||||
ifneq (,$(call find_include,ncurses))
|
||||
ifneq (,$(call find_lib,ncurses))
|
||||
|
|
|
@ -150,9 +150,6 @@ extern int sim_vax_snprintf(char *buf, size_t buf_size, const char *fmt, ...);
|
|||
#include <pcreposix.h>
|
||||
#include <pcre.h>
|
||||
#define USE_REGEX 1
|
||||
#elif defined(HAVE_REGEX_H)
|
||||
#include <regex.h>
|
||||
#define USE_REGEX 1
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
Loading…
Add table
Reference in a new issue