git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFC/PATCH] Use compatibility regex library for OSX/Darwin

From
Johannes Sixt <j.sixt@viscovery.net>
Date
Sep 10, 2008, 09:49 UTC
Message-ID
<48C7983B.8010308@viscovery.net>
In-Reply-To
<e2b179460809100103t4266650bnac00097cfb86c0b1@mail.gmail.com>
Mike Ralphson schrieb:
Show 9 quoted lines
> 2008/9/7 Arjen Laarhoven <arjen@yaph.org>
>> The standard libc regex library on OSX does not support alternation
>> in POSIX Basic Regular Expression mode.  This breaks the diff.funcname
>> functionality on OSX.
>>
>> Also, I'm sure the problem occurs on more non-Linux systems (or non
>> GNU libc systems).  If people who have access to those systems (BSD's,
>> HP-UX, AIX, etc) can test it, I'd be happy to add those systems to the
>> patch so it can fix for multiple systems at once.
The MinGW part of this patch works just fine:
Tested-by: Johannes Sixt <johannes.sixt@telecom.at>
> I can confirm that the issue shown up by your new testcase is also
> present in AIX 5.3.
...
> but I'm afraid I don't know how to get the combination of gcc + AIX ld
> to link to this in preference to the system defined regex functions.

Does this patchlet help? It gives no warnings or errors on my AIX 4.3.3 box and passes the new test (which fails without this).

diff --git a/Makefile b/Makefile
index 98d67f1..0637419 100644
--- a/Makefile
+++ b/Makefile
@@ -702,6 +702,8 @@ ifeq ($(uname_S),AIX)
 	INTERNAL_QSORT = UnfortunatelyYes
 	NEEDS_LIBICONV=YesPlease
 	BASIC_CFLAGS += -D_LARGE_FILES
+	COMPAT_CFLAGS += -Icompat/regex
+	COMPAT_OBJS += compat/regex/regex.o
 endif
 ifeq ($(uname_S),GNU)
 	# GNU/Hurd
Previous: Mike RalphsonNext: Arjen Laarhoven
Message 3 of 44 in “Use compatibility regex library for OSX/Darwin”
  1. Use compatibility regex library for OSX/DarwinArjen Laarhoven, Sep 7, 2008
  2. Mike RalphsonSep 10, 2008
  3. Johannes SixtSep 10, 2008
  4. Arjen LaarhovenSep 10, 2008
  5. Mike RalphsonSep 10, 2008
  6. Mike RalphsonSep 11, 2008
  7. Use compatibility regex library also on AIXJohannes Sixt, Sep 11, 2008
  8. Arjen LaarhovenSep 11, 2008
  9. Mike RalphsonSep 11, 2008
  10. Jeff KingSep 11, 2008
  11. Junio C HamanoSep 11, 2008
  12. Brandon CaseySep 16, 2008
  13. Junio C HamanoSep 16, 2008
  14. 1/4 diff.c: return pattern entry pointer rather than just the hunk header patternBrandon Casey, Sep 18, 2008
  15. 2/4 diff.c: associate a flag with each pattern and use it for compiling regexBrandon Casey, Sep 18, 2008
  16. Junio C HamanoSep 18, 2008
  17. Andreas EricssonSep 18, 2008
  18. Junio C HamanoSep 18, 2008
  19. Andreas EricssonSep 18, 2008
  20. Junio C HamanoSep 18, 2008
  21. 3/4 diff.*.xfuncname which uses "extended" regex's for hunk header selectionBrandon Casey, Sep 18, 2008
  22. 4/4 diff.c: convert builtin funcname patterns to extended regular expressionsBrandon Casey, Sep 18, 2008
  23. 4/4 diff.c: convert builtin funcname patterns to extended regular expressionsBrandon Casey, Sep 18, 2008
  24. Andreas EricssonSep 18, 2008
  25. Junio C HamanoSep 18, 2008
  26. Johan HerlandSep 18, 2008
  27. Gustaf HendebySep 18, 2008
  28. Jonathan del StrotherSep 18, 2008
  29. Brandon CaseySep 18, 2008
  30. Jeff KingSep 16, 2008
  31. Boyd Lynn GerberSep 16, 2008
  32. Jeff KingSep 16, 2008
  33. Boyd Lynn GerberSep 16, 2008
  34. Jeff KingSep 16, 2008
  35. Boyd Lynn GerberSep 17, 2008
  36. Brandon CaseySep 17, 2008
  37. Boyd Lynn GerberSep 17, 2008
  38. Brandon CaseySep 17, 2008
  39. Boyd Lynn GerberSep 17, 2008
  40. Brandon CaseySep 17, 2008
  41. Boyd Lynn GerberSep 17, 2008
  42. Brandon CaseySep 17, 2008
  43. Boyd Lynn GerberSep 17, 2008
  44. Brandon CaseySep 19, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.