[FFmpeg-cvslog] compat/cuda/ptx2c: strip CR from each line
Ricardo Constantino
git at videolan.org
Wed Aug 30 12:26:58 EEST 2017
ffmpeg | branch: master | Ricardo Constantino <wiiaboo at gmail.com> | Tue Aug 29 01:46:13 2017 +0100| [7fbc0825773eb597c5a3f5679a8d58ced0d9456f] | committer: Timo Rothenpieler
compat/cuda/ptx2c: strip CR from each line
Windows nvcc + cl.exe produce a .ctx file with CR+LF newlines which
need to be stripped to work with gcc.
Signed-off-by: Timo Rothenpieler <timo at rothenpieler.org>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7fbc0825773eb597c5a3f5679a8d58ced0d9456f
---
compat/cuda/ptx2c.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/compat/cuda/ptx2c.sh b/compat/cuda/ptx2c.sh
index 1f37023290..5ccabbf56f 100755
--- a/compat/cuda/ptx2c.sh
+++ b/compat/cuda/ptx2c.sh
@@ -29,7 +29,7 @@ NAME="$(basename "$IN" | sed 's/\..*//')"
printf "const char %s_ptx[] = \\" "$NAME" > "$OUT"
while read LINE
do
- printf "\n\t\"%s\\\n\"" "$(printf "%s" "$LINE" | sed 's/["\\]/\\&/g')" >> "$OUT"
+ printf "\n\t\"%s\\\n\"" "$(printf "%s" "$LINE" | sed -e 's/\r//g' -e 's/["\\]/\\&/g')" >> "$OUT"
done < "$IN"
printf ";\n" >> "$OUT"
More information about the ffmpeg-cvslog
mailing list