mirror of https://git.ffmpeg.org/ffmpeg.git
Merge commit '38434a9ff5b9a1a048f32c1c7e2a9519cf12f8ba'
* commit '38434a9ff5b9a1a048f32c1c7e2a9519cf12f8ba': configure: Simplify restrict keyword handling Merged-by: James Almer <jamrial@gmail.com>
This commit is contained in:
commit
c1c720d527
|
@ -5307,9 +5307,8 @@ extern_prefix=${sym%%ff_extern*}
|
||||||
|
|
||||||
! disabled inline_asm && check_inline_asm inline_asm '"" ::'
|
! disabled inline_asm && check_inline_asm inline_asm '"" ::'
|
||||||
|
|
||||||
_restrict=
|
for restrict_keyword in restrict __restrict__ __restrict ""; do
|
||||||
for restrict_keyword in restrict __restrict__ __restrict; do
|
check_cc <<EOF && break
|
||||||
check_cc <<EOF && _restrict=$restrict_keyword && break
|
|
||||||
void foo(char * $restrict_keyword p);
|
void foo(char * $restrict_keyword p);
|
||||||
EOF
|
EOF
|
||||||
done
|
done
|
||||||
|
@ -6495,9 +6494,9 @@ elif enabled_any msvc icl; then
|
||||||
# MSVC 2013 and newer can handle it fine.
|
# MSVC 2013 and newer can handle it fine.
|
||||||
# If this declspec fails, force including stdlib.h before the restrict redefinition
|
# If this declspec fails, force including stdlib.h before the restrict redefinition
|
||||||
# happens in config.h.
|
# happens in config.h.
|
||||||
if [ $_restrict != restrict ]; then
|
if [ $restrict_keyword != restrict ]; then
|
||||||
check_cc <<EOF || add_cflags -FIstdlib.h
|
check_cc <<EOF || add_cflags -FIstdlib.h
|
||||||
__declspec($_restrict) void* foo(int);
|
__declspec($restrict_keyword) void *foo(int);
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
# the new SSA optimzer in VS2015 U3 is mis-optimizing some parts of the code
|
# the new SSA optimzer in VS2015 U3 is mis-optimizing some parts of the code
|
||||||
|
@ -6972,7 +6971,7 @@ cat > $TMPH <<EOF
|
||||||
#define FFMPEG_DATADIR "$(eval c_escape $datadir)"
|
#define FFMPEG_DATADIR "$(eval c_escape $datadir)"
|
||||||
#define AVCONV_DATADIR "$(eval c_escape $datadir)"
|
#define AVCONV_DATADIR "$(eval c_escape $datadir)"
|
||||||
#define CC_IDENT "$(c_escape ${cc_ident:-Unknown compiler})"
|
#define CC_IDENT "$(c_escape ${cc_ident:-Unknown compiler})"
|
||||||
#define av_restrict $_restrict
|
#define av_restrict $restrict_keyword
|
||||||
#define EXTERN_PREFIX "${extern_prefix}"
|
#define EXTERN_PREFIX "${extern_prefix}"
|
||||||
#define EXTERN_ASM ${extern_prefix}
|
#define EXTERN_ASM ${extern_prefix}
|
||||||
#define BUILDSUF "$build_suffix"
|
#define BUILDSUF "$build_suffix"
|
||||||
|
|
Loading…
Reference in New Issue