Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
VideoLAN
libmpeg2
Commits
a161f154
Commit
a161f154
authored
Mar 04, 2002
by
Michel Lespinasse
Browse files
configure-time support for the restrict keyword.
parent
8642528b
Changes
3
Hide whitespace changes
Inline
Side-by-side
mpeg2dec/acinclude.m4
View file @
a161f154
dnl AC_C_RESTRICT
dnl Do nothing if the compiler accepts the restrict keyword.
dnl Otherwise define restrict to __restrict__ or __restrict if one of
dnl those work, otherwise define restrict to be empty.
AC_DEFUN([AC_C_RESTRICT],
[ac_cv_c_inline=no
for ac_kw in restrict __restrict__ __restrict; do
AC_TRY_COMPILE([],[char * $ac_kw p;],[ac_cv_c_restrict=$ac_kw; break])
done
case $ac_cv_c_restrict in
restrict) ;;
no) AC_DEFINE([restrict],,
[Define as `__restrict' if that's what the C compiler calls
it, or to nothing if it is not supported.]) ;;
*) AC_DEFINE_UNQUOTED([restrict],$ac_cv_c_restrict) ;;
esac])
dnl AC_C_ATTRIBUTE_ALIGNED
dnl define ATTRIBUTE_ALIGNED_MAX to the maximum alignment if this is supported
AC_DEFUN([AC_C_ATTRIBUTE_ALIGNED],
...
...
mpeg2dec/configure.in
View file @
a161f154
...
...
@@ -95,6 +95,7 @@ AC_CHECK_GENERATE_INTTYPES([include])
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_C_INLINE
AC_C_RESTRICT
AC_TYPE_SIZE_T
AC_C_BIGENDIAN
...
...
mpeg2dec/vc++/config.h
View file @
a161f154
...
...
@@ -101,5 +101,9 @@
if it is not supported. */
#define inline __inline
/* Define as `__restrict' if that's what the C compiler calls it, or to
nothing if it is not supported. */
#define restrict __restrict
/* Define to `unsigned' if <sys/types.h> does not define. */
/* #undef size_t */
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