diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-10-24 13:31:46 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-10-24 13:42:58 +0200 |
commit | f3b8096bc0e7df9e45db1023d6e6e7bff177d0c4 (patch) | |
tree | 9b3c775ca329b0453593297d2bd7915ac88bb61e /compat | |
parent | 42ee9f3981979880209a60d1ac30057fcfab6e53 (diff) | |
parent | 0c03cc68386443f1e96ab6fb358220faf67cd5ff (diff) | |
download | ffmpeg-f3b8096bc0e7df9e45db1023d6e6e7bff177d0c4.tar.gz |
Merge commit '0c03cc68386443f1e96ab6fb358220faf67cd5ff'
* commit '0c03cc68386443f1e96ab6fb358220faf67cd5ff':
mp3: exit on parsing error in mp_decode_frame
rtmppkt: Avoid unescaped backslash in Doxygen comment
fate-lavfi: replace sed/grep/cut combos with awk
build: Plan 9 support
Conflicts:
configure
tests/lavfi-regression.sh
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'compat')
-rwxr-xr-x | compat/plan9/head | 10 | ||||
-rw-r--r-- | compat/plan9/main.c | 34 | ||||
-rwxr-xr-x | compat/plan9/printf | 2 |
3 files changed, 46 insertions, 0 deletions
diff --git a/compat/plan9/head b/compat/plan9/head new file mode 100755 index 0000000000..2840b2d50f --- /dev/null +++ b/compat/plan9/head @@ -0,0 +1,10 @@ +#!/bin/sh + +n=10 + +case "$1" in + -n) n=$2; shift 2 ;; + -n*) n=${1#-n}; shift ;; +esac + +exec sed ${n}q "$@" diff --git a/compat/plan9/main.c b/compat/plan9/main.c new file mode 100644 index 0000000000..d46f96d170 --- /dev/null +++ b/compat/plan9/main.c @@ -0,0 +1,34 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +int plan9_main(int argc, char **argv); + +#undef main +int main(int argc, char **argv) +{ + /* The setfcr() function in lib9 is broken, must use asm. */ +#ifdef __i386 + short fcr; + __asm__ volatile ("fstcw %0 \n" + "or $63, %0 \n" + "fldcw %0 \n" + : "=m"(fcr)); +#endif + + return plan9_main(argc, argv); +} diff --git a/compat/plan9/printf b/compat/plan9/printf new file mode 100755 index 0000000000..1a70a9e91a --- /dev/null +++ b/compat/plan9/printf @@ -0,0 +1,2 @@ +#!/bin/sh +exec awk "BEGIN { for (i = 2; i < ARGC; i++) printf \"$1\", ARGV[i] }" "$@" |