diff options
author | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2018-06-26 05:24:38 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2018-06-26 11:44:54 -0400 |
commit | 06501a6d2d2912b9e357702327c0249a5ecd7c9e (patch) | |
tree | ae17ccbcca9f33512b5641f07d7eee0872f8ee41 /Documentation/sound | |
parent | 5c10ed433da26ff3509ae11c6b22d21e131484d8 (diff) |
ALSA:: multisound.sh: fix script to make it build with modern tools
The script is old and produce some warnings and errors, because
it lacks including stdlib.h and io.h is at sys/io.h.
Fix it to run with the tools found on modern Linux distros.
Tested building it on Fedora 28.
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'Documentation/sound')
-rwxr-xr-x | Documentation/sound/cards/multisound.sh | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/Documentation/sound/cards/multisound.sh b/Documentation/sound/cards/multisound.sh index 7a7a88256dfd..0e0cb029421b 100755 --- a/Documentation/sound/cards/multisound.sh +++ b/Documentation/sound/cards/multisound.sh | |||
@@ -381,11 +381,11 @@ | |||
381 | # This shar contains: | 381 | # This shar contains: |
382 | # length mode name | 382 | # length mode name |
383 | # ------ ---------- ------------------------------------------ | 383 | # ------ ---------- ------------------------------------------ |
384 | # 2046 -rw-rw-r-- MultiSound.d/setdigital.c | 384 | # 2064 -rw-rw-r-- MultiSound.d/setdigital.c |
385 | # 10235 -rw-rw-r-- MultiSound.d/pinnaclecfg.c | 385 | # 10224 -rw-rw-r-- MultiSound.d/pinnaclecfg.c |
386 | # 106 -rw-rw-r-- MultiSound.d/Makefile | 386 | # 106 -rw-rw-r-- MultiSound.d/Makefile |
387 | # 141 -rw-rw-r-- MultiSound.d/conv.l | 387 | # 146 -rw-rw-r-- MultiSound.d/conv.l |
388 | # 1472 -rw-rw-r-- MultiSound.d/msndreset.c | 388 | # 1491 -rw-rw-r-- MultiSound.d/msndreset.c |
389 | # | 389 | # |
390 | save_IFS="${IFS}" | 390 | save_IFS="${IFS}" |
391 | IFS="${IFS}:" | 391 | IFS="${IFS}:" |
@@ -471,6 +471,7 @@ X * | |||
471 | X ********************************************************************/ | 471 | X ********************************************************************/ |
472 | X | 472 | X |
473 | #include <stdio.h> | 473 | #include <stdio.h> |
474 | #include <stdlib.h> | ||
474 | #include <unistd.h> | 475 | #include <unistd.h> |
475 | #include <fcntl.h> | 476 | #include <fcntl.h> |
476 | #include <sys/types.h> | 477 | #include <sys/types.h> |
@@ -538,8 +539,8 @@ e87217fc3e71288102ba41fd81f71ec4 MultiSound.d/setdigital.c | |||
538 | SHAR_EOF | 539 | SHAR_EOF |
539 | else | 540 | else |
540 | shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'MultiSound.d/setdigital.c'`" | 541 | shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'MultiSound.d/setdigital.c'`" |
541 | test 2046 -eq "$shar_count" || | 542 | test 2064 -eq "$shar_count" || |
542 | $echo 'MultiSound.d/setdigital.c:' 'original size' '2046,' 'current size' "$shar_count!" | 543 | $echo 'MultiSound.d/setdigital.c:' 'original size' '2064,' 'current size' "$shar_count!" |
543 | fi | 544 | fi |
544 | fi | 545 | fi |
545 | # ============= MultiSound.d/pinnaclecfg.c ============== | 546 | # ============= MultiSound.d/pinnaclecfg.c ============== |
@@ -581,8 +582,8 @@ X | |||
581 | #include <string.h> | 582 | #include <string.h> |
582 | #include <errno.h> | 583 | #include <errno.h> |
583 | #include <unistd.h> | 584 | #include <unistd.h> |
584 | #include <asm/io.h> | ||
585 | #include <asm/types.h> | 585 | #include <asm/types.h> |
586 | #include <sys/io.h> | ||
586 | X | 587 | X |
587 | #define IREG_LOGDEVICE 0x07 | 588 | #define IREG_LOGDEVICE 0x07 |
588 | #define IREG_ACTIVATE 0x30 | 589 | #define IREG_ACTIVATE 0x30 |
@@ -992,8 +993,8 @@ SHAR_EOF | |||
992 | SHAR_EOF | 993 | SHAR_EOF |
993 | else | 994 | else |
994 | shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'MultiSound.d/pinnaclecfg.c'`" | 995 | shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'MultiSound.d/pinnaclecfg.c'`" |
995 | test 10235 -eq "$shar_count" || | 996 | test 10224 -eq "$shar_count" || |
996 | $echo 'MultiSound.d/pinnaclecfg.c:' 'original size' '10235,' 'current size' "$shar_count!" | 997 | $echo 'MultiSound.d/pinnaclecfg.c:' 'original size' '10224,' 'current size' "$shar_count!" |
997 | fi | 998 | fi |
998 | fi | 999 | fi |
999 | # ============= MultiSound.d/Makefile ============== | 1000 | # ============= MultiSound.d/Makefile ============== |
@@ -1039,7 +1040,7 @@ DB | |||
1039 | [0-9A-Fa-f]+H { int n; sscanf(yytext, "%xH", &n); printf("%c", n); } | 1040 | [0-9A-Fa-f]+H { int n; sscanf(yytext, "%xH", &n); printf("%c", n); } |
1040 | %% | 1041 | %% |
1041 | int yywrap() { return 1; } | 1042 | int yywrap() { return 1; } |
1042 | main() { yylex(); } | 1043 | void main() { yylex(); } |
1043 | SHAR_EOF | 1044 | SHAR_EOF |
1044 | $shar_touch -am 0828231798 'MultiSound.d/conv.l' && | 1045 | $shar_touch -am 0828231798 'MultiSound.d/conv.l' && |
1045 | chmod 0664 'MultiSound.d/conv.l' || | 1046 | chmod 0664 'MultiSound.d/conv.l' || |
@@ -1052,8 +1053,8 @@ d2411fc32cd71a00dcdc1f009e858dd2 MultiSound.d/conv.l | |||
1052 | SHAR_EOF | 1053 | SHAR_EOF |
1053 | else | 1054 | else |
1054 | shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'MultiSound.d/conv.l'`" | 1055 | shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'MultiSound.d/conv.l'`" |
1055 | test 141 -eq "$shar_count" || | 1056 | test 146 -eq "$shar_count" || |
1056 | $echo 'MultiSound.d/conv.l:' 'original size' '141,' 'current size' "$shar_count!" | 1057 | $echo 'MultiSound.d/conv.l:' 'original size' '146,' 'current size' "$shar_count!" |
1057 | fi | 1058 | fi |
1058 | fi | 1059 | fi |
1059 | # ============= MultiSound.d/msndreset.c ============== | 1060 | # ============= MultiSound.d/msndreset.c ============== |
@@ -1085,6 +1086,7 @@ X * | |||
1085 | X ********************************************************************/ | 1086 | X ********************************************************************/ |
1086 | X | 1087 | X |
1087 | #include <stdio.h> | 1088 | #include <stdio.h> |
1089 | #include <stdlib.h> | ||
1088 | #include <unistd.h> | 1090 | #include <unistd.h> |
1089 | #include <fcntl.h> | 1091 | #include <fcntl.h> |
1090 | #include <sys/types.h> | 1092 | #include <sys/types.h> |
@@ -1129,8 +1131,8 @@ c52f876521084e8eb25e12e01dcccb8a MultiSound.d/msndreset.c | |||
1129 | SHAR_EOF | 1131 | SHAR_EOF |
1130 | else | 1132 | else |
1131 | shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'MultiSound.d/msndreset.c'`" | 1133 | shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'MultiSound.d/msndreset.c'`" |
1132 | test 1472 -eq "$shar_count" || | 1134 | test 1491 -eq "$shar_count" || |
1133 | $echo 'MultiSound.d/msndreset.c:' 'original size' '1472,' 'current size' "$shar_count!" | 1135 | $echo 'MultiSound.d/msndreset.c:' 'original size' '1491,' 'current size' "$shar_count!" |
1134 | fi | 1136 | fi |
1135 | fi | 1137 | fi |
1136 | rm -fr _sh01426 | 1138 | rm -fr _sh01426 |