Commit 85fc1a18 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit '3a7050ff'

* commit '3a7050ff':
  build: Add _Pragma macro to disable deprecated declaration warnings

Conflicts:
	configure
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents fa5410f6 3a7050ff
...@@ -1497,6 +1497,7 @@ HAVE_LIST=" ...@@ -1497,6 +1497,7 @@ HAVE_LIST="
pod2man pod2man
poll_h poll_h
posix_memalign posix_memalign
pragma_deprecated
pthread_cancel pthread_cancel
rdtsc rdtsc
rsync_contimeout rsync_contimeout
...@@ -3777,6 +3778,11 @@ void foo(char * $restrict_keyword p); ...@@ -3777,6 +3778,11 @@ void foo(char * $restrict_keyword p);
EOF EOF
done done
check_cc <<EOF && enable pragma_deprecated
_Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
_Pragma("GCC diagnostic warning \"-Wdeprecated-declarations\"")
EOF
check_cc <<EOF && enable attribute_packed check_cc <<EOF && enable attribute_packed
struct { int x; } __attribute__((packed)) x; struct { int x; } __attribute__((packed)) x;
EOF EOF
......
...@@ -62,6 +62,14 @@ ...@@ -62,6 +62,14 @@
# define av_export # define av_export
#endif #endif
#if HAVE_PRAGMA_DEPRECATED
# define FF_DISABLE_DEPRECATION_WARNINGS _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
# define FF_ENABLE_DEPRECATION_WARNINGS _Pragma("GCC diagnostic warning \"-Wdeprecated-declarations\"")
#else
# define FF_DISABLE_DEPRECATION_WARNINGS
# define FF_ENABLE_DEPRECATION_WARNINGS
#endif
#ifndef INT_BIT #ifndef INT_BIT
# define INT_BIT (CHAR_BIT * sizeof(int)) # define INT_BIT (CHAR_BIT * sizeof(int))
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment