diff mbox series

[FFmpeg-devel] avutil/internal: remove timer.h again

Message ID tencent_38702C2D019AC840689A3D9F00AB334E7F08@qq.com
State Accepted
Commit f0f596dbc6b45b544d2d2d4fb78c0a2bdc3e6eb1
Headers show
Series [FFmpeg-devel] avutil/internal: remove timer.h again | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Zhao Zhili April 5, 2023, 2:50 p.m. UTC
From: Zhao Zhili <zhilizhao@tencent.com>

timer.h has been removed from internal.h, and then added back with
3e6088f for convenience. This patch removed it again for the
following reasons:

1. Only includes what's necessary is a common and safe strategy.

2. It fixed some build errors on Android:
  a. libavutil/timer.h includes sys/ioctl.h, and ioctl.h includes
     termios.h on Android.
  b. termios.h reserves names prefixed with ‘c_’, ‘V’, ‘I’, ‘O’, and
     ‘TC’; and names prefixed with ‘B’ followed by a digit.
  c. libavcodec uses B0 B1 and so on as variable names a lot. So
     the code failed to build with --enable-linux-perf, or
     --target-os=Linux.
---
 libavutil/internal.h | 1 -
 1 file changed, 1 deletion(-)

Comments

Anton Khirnov April 11, 2023, 11:34 a.m. UTC | #1
Quoting Zhao Zhili (2023-04-05 16:50:08)
> From: Zhao Zhili <zhilizhao@tencent.com>
> 
> timer.h has been removed from internal.h, and then added back with
> 3e6088f for convenience. This patch removed it again for the
> following reasons:
> 
> 1. Only includes what's necessary is a common and safe strategy.
> 
> 2. It fixed some build errors on Android:
>   a. libavutil/timer.h includes sys/ioctl.h, and ioctl.h includes
>      termios.h on Android.
>   b. termios.h reserves names prefixed with ‘c_’, ‘V’, ‘I’, ‘O’, and
>      ‘TC’; and names prefixed with ‘B’ followed by a digit.
>   c. libavcodec uses B0 B1 and so on as variable names a lot. So
>      the code failed to build with --enable-linux-perf, or
>      --target-os=Linux.
> ---
>  libavutil/internal.h | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/libavutil/internal.h b/libavutil/internal.h
> index 454c59aa50..001103142b 100644
> --- a/libavutil/internal.h
> +++ b/libavutil/internal.h
> @@ -40,7 +40,6 @@
>  #include <stdio.h>
>  #include "config.h"
>  #include "attributes.h"
> -#include "timer.h"
>  #include "macros.h"
>  #include "pixfmt.h"

I am in favor of this.
Zhao Zhili April 13, 2023, 12:09 p.m. UTC | #2
> On Apr 11, 2023, at 19:34, Anton Khirnov <anton@khirnov.net> wrote:
> 
> Quoting Zhao Zhili (2023-04-05 16:50:08)
>> From: Zhao Zhili <zhilizhao@tencent.com>
>> 
>> timer.h has been removed from internal.h, and then added back with
>> 3e6088f for convenience. This patch removed it again for the
>> following reasons:
>> 
>> 1. Only includes what's necessary is a common and safe strategy.
>> 
>> 2. It fixed some build errors on Android:
>>  a. libavutil/timer.h includes sys/ioctl.h, and ioctl.h includes
>>     termios.h on Android.
>>  b. termios.h reserves names prefixed with ‘c_’, ‘V’, ‘I’, ‘O’, and
>>     ‘TC’; and names prefixed with ‘B’ followed by a digit.
>>  c. libavcodec uses B0 B1 and so on as variable names a lot. So
>>     the code failed to build with --enable-linux-perf, or
>>     --target-os=Linux.
>> ---
>> libavutil/internal.h | 1 -
>> 1 file changed, 1 deletion(-)
>> 
>> diff --git a/libavutil/internal.h b/libavutil/internal.h
>> index 454c59aa50..001103142b 100644
>> --- a/libavutil/internal.h
>> +++ b/libavutil/internal.h
>> @@ -40,7 +40,6 @@
>> #include <stdio.h>
>> #include "config.h"
>> #include "attributes.h"
>> -#include "timer.h"
>> #include "macros.h"
>> #include "pixfmt.h"
> 
> I am in favor of this.

Will apply soon unless someone object.

> 
> -- 
> Anton Khirnov
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
Zhao Zhili April 14, 2023, 12:25 p.m. UTC | #3
> On Apr 13, 2023, at 20:09, zhilizhao(赵志立) <quinkblack@foxmail.com> wrote:
> 
> 
>> On Apr 11, 2023, at 19:34, Anton Khirnov <anton@khirnov.net> wrote:
>> 
>> Quoting Zhao Zhili (2023-04-05 16:50:08)
>>> From: Zhao Zhili <zhilizhao@tencent.com>
>>> 
>>> timer.h has been removed from internal.h, and then added back with
>>> 3e6088f for convenience. This patch removed it again for the
>>> following reasons:
>>> 
>>> 1. Only includes what's necessary is a common and safe strategy.
>>> 
>>> 2. It fixed some build errors on Android:
>>> a. libavutil/timer.h includes sys/ioctl.h, and ioctl.h includes
>>>    termios.h on Android.
>>> b. termios.h reserves names prefixed with ‘c_’, ‘V’, ‘I’, ‘O’, and
>>>    ‘TC’; and names prefixed with ‘B’ followed by a digit.
>>> c. libavcodec uses B0 B1 and so on as variable names a lot. So
>>>    the code failed to build with --enable-linux-perf, or
>>>    --target-os=Linux.
>>> ---
>>> libavutil/internal.h | 1 -
>>> 1 file changed, 1 deletion(-)
>>> 
>>> diff --git a/libavutil/internal.h b/libavutil/internal.h
>>> index 454c59aa50..001103142b 100644
>>> --- a/libavutil/internal.h
>>> +++ b/libavutil/internal.h
>>> @@ -40,7 +40,6 @@
>>> #include <stdio.h>
>>> #include "config.h"
>>> #include "attributes.h"
>>> -#include "timer.h"
>>> #include "macros.h"
>>> #include "pixfmt.h"
>> 
>> I am in favor of this.
> 
> Will apply soon unless someone object.

Applied as f0f596dbc.

> 
>> 
>> -- 
>> Anton Khirnov
>> _______________________________________________
>> ffmpeg-devel mailing list
>> ffmpeg-devel@ffmpeg.org
>> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>> 
>> To unsubscribe, visit link above, or email
>> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
> 
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
diff mbox series

Patch

diff --git a/libavutil/internal.h b/libavutil/internal.h
index 454c59aa50..001103142b 100644
--- a/libavutil/internal.h
+++ b/libavutil/internal.h
@@ -40,7 +40,6 @@ 
 #include <stdio.h>
 #include "config.h"
 #include "attributes.h"
-#include "timer.h"
 #include "macros.h"
 #include "pixfmt.h"