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
70250296
Commit
70250296
authored
Jan 04, 2012
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
contrib: orc: fix android build
google's gcc doesn't understand 'restrict'. Use __restrict__
parent
9f3cdb07
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
0 deletions
+51
-0
contrib/src/orc/android.patch
contrib/src/orc/android.patch
+49
-0
contrib/src/orc/rules.mak
contrib/src/orc/rules.mak
+2
-0
No files found.
contrib/src/orc/android.patch
0 → 100644
View file @
70250296
diff -ur orc.orig/configure.ac orc/configure.ac
--- orc.orig/configure.ac 2011-12-28 10:09:52.724224002 -0500
+++ orc/configure.ac 2011-12-28 10:14:06.056224002 -0500
@@ -67,6 +67,21 @@
)
AC_SUBST(LIBRT)
+HAVE_ANDROID=0
+AC_MSG_CHECKING([for an Android system])
+ AC_PREPROC_IFELSE([AC_LANG_PROGRAM(
+ [[#ifndef __ANDROID__
+# error Not Android
+#endif
+ ]],[[;]])
+ ],[
+ HAVE_ANDROID="1"
+ AC_MSG_RESULT([yes])
+ ],[
+ AC_MSG_RESULT([no])
+ ])
+test "${HAVE_ANDROID}" = "1" && AC_DEFINE([ORC_RESTRICT],[__restrict__], [restrict keyword])
+
AC_CACHE_CHECK(for monotonic clocks,
orc_cv_monotonic_clock,AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
#include <time.h>
diff -ur orc.orig/orc/orcfunctions.h orc/orc/orcfunctions.h
--- orc.orig/orc/orcfunctions.h 2011-12-28 10:09:52.736224002 -0500
+++ orc/orc/orcfunctions.h 2011-12-28 10:15:01.216224002 -0500
@@ -58,7 +58,7 @@
typedef union { orc_int64 i; double f; orc_int32 x2[2]; float x2f[2]; orc_int16 x4[4]; } orc_union64;
#endif
#ifndef ORC_RESTRICT
-#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L && !defined(__ANDROID__)
#define ORC_RESTRICT restrict
#elif defined(__GNUC__) && __GNUC__ >= 4
#define ORC_RESTRICT __restrict__
diff -ru orc.orig/orc/orcprogram-c.c orc/orc/orcprogram-c.c
--- orc.orig/orc/orcprogram-c.c 2011-12-28 10:18:36.624224002 -0500
+++ orc/orc/orcprogram-c.c 2011-12-28 10:19:12.232224002 -0500
@@ -76,7 +76,7 @@
"typedef union { orc_int64 i; double f; orc_int32 x2[2]; float x2f[2]; orc_int16 x4[4]; } orc_union64;\n"
"#endif\n"
"#ifndef ORC_RESTRICT\n"
- "#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L\n"
+ "#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L && !defined(__ANDROID__)\n"
"#define ORC_RESTRICT restrict\n"
"#elif defined(__GNUC__) && __GNUC__ >= 4\n"
"#define ORC_RESTRICT __restrict__\n"
contrib/src/orc/rules.mak
View file @
70250296
...
...
@@ -16,10 +16,12 @@ $(TARBALLS)/orc-$(ORC_VERSION).tar.gz:
orc
:
orc-$(ORC_VERSION).tar.gz .sum-orc
$(UNPACK)
$(APPLY)
$(SRC)
/orc/orc-stdint.patch
$(APPLY)
$(SRC)
/orc/android.patch
$(UPDATE_AUTOCONFIG)
$(MOVE)
.orc
:
orc
$(RECONF)
cd
$<
&&
$(HOSTVARS)
./configure
$(HOSTCONF)
cd
$<
&&
$(MAKE)
install
touch
$@
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