diff options
author | Thomas Gellekum <tg@FreeBSD.org> | 2001-03-21 12:58:39 +0000 |
---|---|---|
committer | Thomas Gellekum <tg@FreeBSD.org> | 2001-03-21 12:58:39 +0000 |
commit | 174fded7f659c0a46457b3a6e3985dfe6f926413 (patch) | |
tree | 226919297364eeded694b01b5540caf72da9615d /graphics/opendx/files/patch-src:uipp:dxui:MacroDefinition.C | |
parent | Update to 1.16. (diff) |
- Remove `-lcompat' again, the new patches contain code fixes.
- Fix paths in the documentation (/usr/lpp -> ${PREFIX}).
- patch-ae is no longer needed with gmake.
Diffstat (limited to 'graphics/opendx/files/patch-src:uipp:dxui:MacroDefinition.C')
-rw-r--r-- | graphics/opendx/files/patch-src:uipp:dxui:MacroDefinition.C | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/graphics/opendx/files/patch-src:uipp:dxui:MacroDefinition.C b/graphics/opendx/files/patch-src:uipp:dxui:MacroDefinition.C new file mode 100644 index 000000000000..51aa0cadf4ba --- /dev/null +++ b/graphics/opendx/files/patch-src:uipp:dxui:MacroDefinition.C @@ -0,0 +1,59 @@ +--- src/uipp/dxui/MacroDefinition.C.orig Tue Mar 20 18:52:41 2001 ++++ src/uipp/dxui/MacroDefinition.C Tue Mar 20 20:49:26 2001 +@@ -42,7 +42,14 @@ + + #define OLD_DUMMY_DESCRIPTION_STRING "Generated dummy input" + +-#if defined(HAVE_RE_COMP) ++#if HAVE_REGCOMP && HAVE_REGEX_H ++/* prefer POSIX style regcomp(3) over obsolete versions */ ++extern "C" { ++#include <regex.h> ++} ++#undef HAVE_RE_COMP ++#undef HAVE_FINDFIRST ++#elif defined(HAVE_RE_COMP) + #undef HAVE_REGCMP + #undef HAVE_REGCOMP + #undef HAVE_FINDFIRST +@@ -53,7 +60,7 @@ + #undef HAVE_FINDFIRST + extern "C" char *regcmp(...); + extern "C" char *regex(char *, char *, ...); +-#elif HAVE_REGCOMP ++#elif HAVE_REGCOMP && HAVE_REGEXP_H + extern "C" { + #include <regexp.h> + } +@@ -594,7 +601,18 @@ + } + else + { +-#if defined(HAVE_REGCOMP) ++#if defined(HAVE_REGCOMP) && defined(HAVE_REGEX_H) ++ ++ regex_t net_file; ++ ASSERT(regcomp(&net_file, ".[.]*\\.net$", REG_NOSUB) == 0); ++ ++ struct dirent *entry; ++ while (entry = readdir(d)) ++ { ++ boolean exists = regexec(&net_file, entry->d_name, 0, NULL, 0); ++ if (exists == 0) ++ ++#elif defined(HAVE_REGCOMP) && defined(HAVE_REGEXP_H) + + char *net_file = (char *)regcomp(".[.]*\\.net$"); + ASSERT(net_file != NULL); +@@ -691,7 +709,10 @@ + } + _findclose(handle); + delete srch_string; +-#elif defined(HAVE_REGCOMP) ++#elif defined(HAVE_REGCOMP) && defined(HAVE_REGEX_H) ++ } ++ } ++#elif defined(HAVE_REGCOMP) && defined(HAVE_REGEXP_H) + } + } + #elif defined(HAVE_RE_COMP) |