threads / patch / 57666

patchconfigure.ac: fix HAVE_SYNC_FILE_RANGE definition

Subject: [PATCH] configure.ac: fix HAVE_SYNC_FILE_RANGE definition

## tl;dr

3 messages between Apr 5, 2022 and Apr 6, 2022. Diffs are folded; open one to read it.

replies: 2people: 3as markdown or json

Adam Dinwoodie· Apr 5, 2022, 10:00 UTC · lore

If sync_file_range is not available when building the configure script, there is a cosmetic bug when running that script reporting "HAVE_SYNC_FILE_RANGE: command not found". Remove that error message by defining HAVE_SYNC_FILE_RANGE to an empty string, rather than generating a script where that appears as a bare command.

Signed-off-by: Adam Dinwoodie <adam@dinwoodie.org>
---
 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to configure.ac +1 −1
diff --git a/configure.ac b/configure.ac
index 6bd6bef1c4..316a31d231 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1087,7 +1087,7 @@ GIT_CONF_SUBST([HAVE_CLOCK_MONOTONIC])
 # Define HAVE_SYNC_FILE_RANGE=YesPlease if sync_file_range is available.
 GIT_CHECK_FUNC(sync_file_range,
 	[HAVE_SYNC_FILE_RANGE=YesPlease],
-	[HAVE_SYNC_FILE_RANGE])
+	[HAVE_SYNC_FILE_RANGE=])
 GIT_CONF_SUBST([HAVE_SYNC_FILE_RANGE])
 
 #
-- 
2.35.1
Neeraj Singh· Apr 5, 2022, 15:31 UTC · re: Adam Dinwoodie · lore

Re: [PATCH] configure.ac: fix HAVE_SYNC_FILE_RANGE definition

On Tue, Apr 05, 2022 at 11:00:20AM +0100, Adam Dinwoodie wrote:
Show 27 quoted lines
> If sync_file_range is not available when building the configure script,
> there is a cosmetic bug when running that script reporting
> "HAVE_SYNC_FILE_RANGE: command not found".  Remove that error message by
> defining HAVE_SYNC_FILE_RANGE to an empty string, rather than generating
> a script where that appears as a bare command.
> 
> Signed-off-by: Adam Dinwoodie <adam@dinwoodie.org>
> ---
>  configure.ac | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/configure.ac b/configure.ac
> index 6bd6bef1c4..316a31d231 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -1087,7 +1087,7 @@ GIT_CONF_SUBST([HAVE_CLOCK_MONOTONIC])
>  # Define HAVE_SYNC_FILE_RANGE=YesPlease if sync_file_range is available.
>  GIT_CHECK_FUNC(sync_file_range,
>  	[HAVE_SYNC_FILE_RANGE=YesPlease],
> -	[HAVE_SYNC_FILE_RANGE])
> +	[HAVE_SYNC_FILE_RANGE=])
>  GIT_CONF_SUBST([HAVE_SYNC_FILE_RANGE])
>  
>  #
> -- 
> 2.35.1
> 
Thanks for fixing this.  Looks good to me.
-Neeraj
Junio C Hamano· Apr 6, 2022, 16:35 UTC · re: Neeraj Singh · lore

Re: [PATCH] configure.ac: fix HAVE_SYNC_FILE_RANGE definition

Neeraj Singh <nksingh85@gmail.com> writes:
Show 30 quoted lines
> On Tue, Apr 05, 2022 at 11:00:20AM +0100, Adam Dinwoodie wrote:
>> If sync_file_range is not available when building the configure script,
>> there is a cosmetic bug when running that script reporting
>> "HAVE_SYNC_FILE_RANGE: command not found".  Remove that error message by
>> defining HAVE_SYNC_FILE_RANGE to an empty string, rather than generating
>> a script where that appears as a bare command.
>> 
>> Signed-off-by: Adam Dinwoodie <adam@dinwoodie.org>
>> ---
>>  configure.ac | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/configure.ac b/configure.ac
>> index 6bd6bef1c4..316a31d231 100644
>> --- a/configure.ac
>> +++ b/configure.ac
>> @@ -1087,7 +1087,7 @@ GIT_CONF_SUBST([HAVE_CLOCK_MONOTONIC])
>>  # Define HAVE_SYNC_FILE_RANGE=YesPlease if sync_file_range is available.
>>  GIT_CHECK_FUNC(sync_file_range,
>>  	[HAVE_SYNC_FILE_RANGE=YesPlease],
>> -	[HAVE_SYNC_FILE_RANGE])
>> +	[HAVE_SYNC_FILE_RANGE=])
>>  GIT_CONF_SUBST([HAVE_SYNC_FILE_RANGE])
>>  
>>  #
>> -- 
>> 2.35.1
>> 
>
> Thanks for fixing this.  Looks good to me.
Thanks, both.
Will apply.

← back to recent threads