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

Re: [PATCH v4] grep: fix multibyte regex handling under macOS

From
Diomidis Spinellis <dds@aueb.gr>
Date
Sep 13, 2022, 18:09 UTC
Message-ID
<a8ba447f-d087-1c5e-0ce0-a9040ad080d1@aueb.gr>
In-Reply-To
<xmqqzgf389k9.fsf@gitster.g>
On 13-Sep-22 20:32, Junio C Hamano wrote:
Show 14 quoted lines
>> +#include <locale.h>
>>   #ifdef NEEDS_SYS_PARAM_H
>>   #include <sys/param.h>
>>   #endif
> 
> I'll let others more familiar with the locale support to comment on
> these changes.  We are unconditionally including <locale.h> now;
> platforms that lack <locale.h> could set NO_GETTEXT to work it
> around before this change, but that will no longer work.
> 
> I do not know if thta is a practical downside to anybody, but it
> could be a problem.
> 
> Perhaps cook this in 'next' and see if anybody screams?

I was programming in C before locale.h was introduced, so its availability was something that worried me as well. I looked up whether we could/should use a GNU autoconf macro to test for the locale.h availability. According to autoconf's documentation "All hosted environments that are still of interest for portable code provide all of the headers specified in ISO C90 (as amended in 1995): assert.h, [...] locale.h [...], and wctype.h. Most programs can safely include these headers unconditionally." [1]

[1] https://www.gnu.org/software/autoconf/manual/autoconf-2.70/autoconf.html
Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 4 in “grep: fix multibyte regex handling under macOS”
  1. grep: fix multibyte regex handling under macOSDiomidis Spinellis, Aug 26, 2022
  2. Junio C HamanoSep 13, 2022
  3. Diomidis SpinellisSep 13, 2022
  4. Junio C HamanoSep 13, 2022

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.