Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
351690f6
Commit
351690f6
authored
Jan 31, 2012
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Provide static_assert() replacement
parent
2b268061
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
0 deletions
+19
-0
configure.ac
configure.ac
+14
-0
include/vlc_fixups.h
include/vlc_fixups.h
+5
-0
No files found.
configure.ac
View file @
351690f6
...
@@ -511,6 +511,20 @@ AC_LINK_IFELSE([
...
@@ -511,6 +511,20 @@ AC_LINK_IFELSE([
c = NULL;
c = NULL;
])],[AC_DEFINE([HAVE_VASPRINTF],[1],[Define to 1 if you have asprintf function])],[AC_LIBOBJ([vasprintf])])
])],[AC_DEFINE([HAVE_VASPRINTF],[1],[Define to 1 if you have asprintf function])],[AC_LIBOBJ([vasprintf])])
dnl C11 static_assert()
AC_MSG_CHECKING([for static_assert in assert.h])
AC_PREPROC_IFELSE([AC_LANG_SOURCE([
#include <assert.h>
#ifndef static_assert
# error BOOM!
#endif
])], [
AC_MSG_RESULT([yes])
AC_DEFINE([HAVE_STATIC_ASSERT], [1], [Define to 1 if <assert.h> defines static_assert.])
], [
AC_MSG_RESULT([no])
])
# Windows CE does not have strcoll()
# Windows CE does not have strcoll()
AC_FUNC_STRCOLL
AC_FUNC_STRCOLL
...
...
include/vlc_fixups.h
View file @
351690f6
...
@@ -229,6 +229,11 @@ static inline locale_t newlocale(int mask, const char * locale, locale_t base)
...
@@ -229,6 +229,11 @@ static inline locale_t newlocale(int mask, const char * locale, locale_t base)
}
}
#endif
#endif
#if !defined (HAVE_STATIC_ASSERT)
# define _Static_assert(x, s) ((void) sizeof (struct { unsigned:-!(x); }))
# define static_assert _Static_assert
#endif
/* Alignment of critical static data structures */
/* Alignment of critical static data structures */
#ifdef ATTRIBUTE_ALIGNED_MAX
#ifdef ATTRIBUTE_ALIGNED_MAX
# define ATTR_ALIGN(align) __attribute__ ((__aligned__ ((ATTRIBUTE_ALIGNED_MAX < align) ? ATTRIBUTE_ALIGNED_MAX : align)))
# define ATTR_ALIGN(align) __attribute__ ((__aligned__ ((ATTRIBUTE_ALIGNED_MAX < align) ? ATTRIBUTE_ALIGNED_MAX : align)))
...
...
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