Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
38434a9f
Commit
38434a9f
authored
Nov 10, 2017
by
Diego Biurrun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
configure: Simplify restrict keyword handling
Skip a variable indirection and only redefine restrict if necessary.
parent
4cf84e25
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
configure
configure
+7
-6
No files found.
configure
View file @
38434a9f
...
...
@@ -4144,9 +4144,8 @@ extern_prefix=${sym%%ff_extern*}
!
disabled inline_asm
&&
check_inline_asm inline_asm
'"" ::'
_restrict
=
for
restrict_keyword
in
restrict __restrict__ __restrict
;
do
check_cc
<<
EOF
&& _restrict=
$restrict_keyword
&& break
for
restrict_keyword
in
restrict __restrict__ __restrict
""
;
do
check_cc
<<
EOF
&& break
void foo(char *
$restrict_keyword
p);
EOF
done
...
...
@@ -4974,9 +4973,9 @@ elif enabled_any msvc icl; then
# MSVC 2013 and newer can handle it fine.
# If this declspec fails, force including stdlib.h before the restrict redefinition
# happens in config.h.
if
[
$
_restrict
!=
restrict
]
;
then
if
[
$
restrict_keyword
!=
restrict
]
;
then
check_cc
<<
EOF
|| add_cflags -FIstdlib.h
__declspec(
$
_restrict
) void*
foo(int);
__declspec(
$
restrict_keyword
) void *
foo(int);
EOF
fi
fi
...
...
@@ -5323,12 +5322,14 @@ cat > $TMPH <<EOF
#define LIBAV_LICENSE "
$(
c_escape
$license
)
"
#define AVCONV_DATADIR "
$(
eval
c_escape
$datadir
)
"
#define CC_IDENT "
$(
c_escape
${
cc_ident
:-
Unknown
compiler
})
"
#define restrict
$_restrict
#define EXTERN_PREFIX "
${
extern_prefix
}
"
#define EXTERN_ASM
${
extern_prefix
}
#define SLIBSUF "
$SLIBSUF
"
EOF
test
$restrict_keyword
!=
restrict
&&
echo
"#define restrict
$restrict_keyword
"
>>
$TMPH
test
-n
"
$malloc_prefix
"
&&
echo
"#define MALLOC_PREFIX
$malloc_prefix
"
>>
$TMPH
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment