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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Diomidis Spinellis <dds@xxxxxxx> writes:

> - Fold test script into t7810-grep.sh
> - Simplify the test prerequisite evaluation

The tests certainly look better, and as v3, the build procedure
sounds OK.

> diff --git a/common-main.c b/common-main.c
> index c531372f3f..0a22861f1c 100644
> --- a/common-main.c
> +++ b/common-main.c
> @@ -40,6 +40,7 @@ int main(int argc, const char **argv)
>  
>  	git_resolve_executable_dir(argv[0]);
>  
> +	setlocale(LC_CTYPE, "");
>  	git_setup_gettext();
>  
>  	initialize_the_repository();
> ...
> diff --git a/git-compat-util.h b/git-compat-util.h
> index 58d7708296..c6fa3c7469 100644
> --- a/git-compat-util.h
> +++ b/git-compat-util.h
> @@ -212,6 +212,7 @@
>  #endif
>  #include <errno.h>
>  #include <limits.h>
> +#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?

Thanks.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux