Skip to content

fix restrict usage in VLC include files

Right now the code uses AC_C_RESTRICT to pick a restrict value that works in C and C++. It's fine with gcc and clang that have __restrict or similar keyword that is understood by both their C and C++ compiler.

But a pure C11 compiler that doesn't have those will en up having no define because it supports the restrict keyword natively. The same compiler when compiling C++ code will have no idea what this restrict keyword is in our headers.

This is easy to test but just commenting the AC_C_RESTRICT line in configure.ac. It will just use the restrict keyword of gcc/clang when compiling C code, and will fail when a header used by C++ modules is used. In other words the AC_C_RESTRICT is only there to find a restrict variant that would also work with C++.

The AC_C_RESTRICT documentation is even bogus as it claims "If the C compiler recognizes the restrict keyword, don't do anything.". But this is not what is done with either gcc or clang, and they do recognize the restrict keyword.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information