Author: Sandro Tosi Description: New patch generated from rplay 3.3.2-12 diff.gz Index: rplay/configure =================================================================== --- rplay.orig/configure 2024-08-08 09:34:14.963482455 +0200 +++ rplay/configure 2024-08-08 09:34:14.955482448 +0200 @@ -527,6 +527,8 @@ +BUILD_TARGETS="include lib adpcm" + export srcdir RPLAY_VERSION=`$srcdir/version` @@ -544,7 +546,7 @@ # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:548: checking for $ac_word" >&5 +echo "configure:550: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -574,7 +576,7 @@ # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:578: checking for $ac_word" >&5 +echo "configure:580: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -625,7 +627,7 @@ # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:629: checking for $ac_word" >&5 +echo "configure:631: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -657,7 +659,7 @@ fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:661: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:663: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -668,12 +670,12 @@ cat > conftest.$ac_ext << EOF -#line 672 "configure" +#line 674 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -699,12 +701,12 @@ { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:703: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:705: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:708: checking whether we are using GNU C" >&5 +echo "configure:710: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -713,7 +715,7 @@ yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:717: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:719: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -732,7 +734,7 @@ ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:736: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:738: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -797,7 +799,7 @@ echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 -echo "configure:801: checking for POSIXized ISC" >&5 +echo "configure:803: checking for POSIXized ISC" >&5 if test -d /etc/conf/kconfig.d && grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 then @@ -818,7 +820,7 @@ fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:822: checking how to run the C preprocessor" >&5 +echo "configure:824: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -833,13 +835,13 @@ # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:843: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:845: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -850,13 +852,13 @@ rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:860: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:862: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -867,13 +869,13 @@ rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:877: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:879: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -928,7 +930,7 @@ # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:932: checking for a BSD compatible install" >&5 +echo "configure:934: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -981,7 +983,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:985: checking whether ln -s works" >&5 +echo "configure:987: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1004,7 +1006,7 @@ # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1008: checking for $ac_word" >&5 +echo "configure:1010: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1036,7 +1038,7 @@ # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1040: checking for $ac_word" >&5 +echo "configure:1042: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_ETAGS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1071,7 +1073,7 @@ # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1075: checking for $ac_word" >&5 +echo "configure:1077: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_MAKEDEPEND'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1106,7 +1108,7 @@ # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1110: checking for $ac_word" >&5 +echo "configure:1112: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1141,7 +1143,7 @@ # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1145: checking for $ac_word" >&5 +echo "configure:1147: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_TEXI2DVI'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1176,7 +1178,7 @@ # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1180: checking for $ac_word" >&5 +echo "configure:1182: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_TEXI2HTML'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1211,7 +1213,7 @@ # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1215: checking for $ac_word" >&5 +echo "configure:1217: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_DVIPS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1247,12 +1249,12 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:1251: checking for $ac_hdr that defines DIR" >&5 +echo "configure:1253: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> @@ -1260,7 +1262,7 @@ DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:1264: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1266: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -1285,7 +1287,7 @@ # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:1289: checking for opendir in -ldir" >&5 +echo "configure:1291: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1293,7 +1295,7 @@ ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1326,7 +1328,7 @@ else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:1330: checking for opendir in -lx" >&5 +echo "configure:1332: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1334,7 +1336,7 @@ ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1368,12 +1370,12 @@ fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1372: checking for ANSI C header files" >&5 +echo "configure:1374: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1381,7 +1383,7 @@ #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1385: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1387: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1398,7 +1400,7 @@ if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -1416,7 +1418,7 @@ if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -1437,7 +1439,7 @@ : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -1448,7 +1450,7 @@ exit (0); } EOF -if { (eval echo configure:1452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -1472,12 +1474,12 @@ fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:1476: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:1478: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1486,7 +1488,7 @@ struct tm *tp; ; return 0; } EOF -if { (eval echo configure:1490: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1492: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -1506,21 +1508,21 @@ fi -for ac_hdr in fcntl.h sys/file.h sys/ioctl.h sys/time.h stdlib.h unistd.h memory.h string.h strings.h utime.h limits.h gsm.h gsm/gsm.h rxposix.h rx/rxposix.h +for ac_hdr in fcntl.h sys/file.h sys/ioctl.h sys/time.h stdlib.h unistd.h memory.h string.h strings.h utime.h limits.h gsm.h gsm/gsm.h regex.h rxposix.h rx/rxposix.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1514: checking for $ac_hdr" >&5 +echo "configure:1516: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1524: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1526: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1547,12 +1549,12 @@ done echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:1551: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:1553: checking for sys/wait.h that is POSIX.1 compatible" >&5 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1568,7 +1570,7 @@ s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:1572: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1574: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -1590,12 +1592,12 @@ echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:1594: checking for working const" >&5 +echo "configure:1596: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1650: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -1665,12 +1667,12 @@ fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:1669: checking for size_t" >&5 +echo "configure:1671: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -1702,17 +1704,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1706: checking for $ac_hdr" >&5 +echo "configure:1708: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1716: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1718: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1741,12 +1743,12 @@ for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1745: checking for $ac_func" >&5 +echo "configure:1747: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1794,7 +1796,7 @@ done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:1798: checking for working mmap" >&5 +echo "configure:1800: checking for working mmap" >&5 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1802,7 +1804,7 @@ ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_mmap_fixed_mapped=yes else @@ -1965,7 +1967,7 @@ fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:1969: checking for 8-bit clean memcmp" >&5 +echo "configure:1971: checking for 8-bit clean memcmp" >&5 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1973,7 +1975,7 @@ ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_memcmp_clean=yes else @@ -2001,12 +2003,12 @@ test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}" echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:2005: checking for vprintf" >&5 +echo "configure:2007: checking for vprintf" >&5 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else @@ -2053,12 +2055,12 @@ if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:2057: checking for _doprnt" >&5 +echo "configure:2059: checking for _doprnt" >&5 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else @@ -2106,12 +2108,12 @@ fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:2110: checking return type of signal handlers" >&5 +echo "configure:2112: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2128,7 +2130,7 @@ int i; ; return 0; } EOF -if { (eval echo configure:2132: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2134: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -2149,12 +2151,12 @@ for ac_func in getcwd gethostname mkdir re_comp regcomp select snprintf socket strdup strerror strstr fstat fchmod fchown utime utimes memmove sigset vsnprintf waitpid random srandom do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2153: checking for $ac_func" >&5 +echo "configure:2155: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2202,7 +2204,7 @@ done echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 -echo "configure:2206: checking for socket in -lsocket" >&5 +echo "configure:2208: checking for socket in -lsocket" >&5 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2210,7 +2212,7 @@ ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2242,7 +2244,7 @@ fi echo $ac_n "checking for t_accept in -lnsl""... $ac_c" 1>&6 -echo "configure:2246: checking for t_accept in -lnsl" >&5 +echo "configure:2248: checking for t_accept in -lnsl" >&5 ac_lib_var=`echo nsl'_'t_accept | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2250,7 +2252,7 @@ ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2283,7 +2285,7 @@ echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6 -echo "configure:2287: checking for readline in -lreadline" >&5 +echo "configure:2289: checking for readline in -lreadline" >&5 ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2291,7 +2293,7 @@ ac_save_LIBS="$LIBS" LIBS="-lreadline $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2317,7 +2319,10 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - RL_LIBS="-lreadline" + cat >> confdefs.h <<\EOF +#define HAVE_LIBREADLINE 1 +EOF + RL_LIBS="-lreadline" else echo "$ac_t""no" 1>&6 fi @@ -2325,7 +2330,7 @@ echo $ac_n "checking for gsm_decode in -lgsm""... $ac_c" 1>&6 -echo "configure:2329: checking for gsm_decode in -lgsm" >&5 +echo "configure:2334: checking for gsm_decode in -lgsm" >&5 ac_lib_var=`echo gsm'_'gsm_decode | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2333,7 +2338,7 @@ ac_save_LIBS="$LIBS" LIBS="-lgsm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2359,42 +2364,91 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - HAVE_GSM="yes" + GSM_LIBS="-lgsm"; GSM_INCS="" else echo "$ac_t""no" 1>&6 + + GSM_LIBS="-L../gsm -lgsm"; GSM_INCS="-I\${srcdir}/../gsm" + BUILD_TARGETS="$BUILD_TARGETS gsm" + fi -if test "$HAVE_GSM" = "yes"; then - GSM_LIBS="-lgsm" - GSM_INCS="" + + + +for ac_func in regcomp +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:2383: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 else - GSM_LIBS="-L../gsm -lgsm" - GSM_INCS="-I\${srcdir}/../gsm" -fi + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); +int main() { +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif -echo $ac_n "checking for regncomp in -lrx""... $ac_c" 1>&6 -echo "configure:2379: checking for regncomp in -lrx" >&5 -ac_lib_var=`echo rx'_'regncomp | sed 'y%./+-%__p_%'` +; return 0; } +EOF +if { (eval echo configure:2411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +echo $ac_n "checking for regcomp in -lrx""... $ac_c" 1>&6 +echo "configure:2433: checking for regcomp in -lrx" >&5 +ac_lib_var=`echo rx'_'regcomp | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lrx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2409,18 +2463,22 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - HAVE_RX="yes" + RX_LIBS="-lrx"; RX_INCS="" else echo "$ac_t""no" 1>&6 + + RX_LIBS="-L../rx -lrx"; RX_INCS="-I\${srcdir}/../rx" + BUILD_TARGETS="$BUILD_TARGETS rx" + subdirs="rx" +s%@subdirs@%$subdirs%g + + fi -if test "$HAVE_RX" = "yes"; then - RX_LIBS="-lrx" - RX_INCS="" -else - RX_LIBS="-L../rx -lrx" - RX_INCS="-I\${srcdir}/../rx" + fi +done + @@ -2434,9 +2492,9 @@ if test -z "$RPLAY_TARGET"; then echo $ac_n "checking for sun""... $ac_c" 1>&6 -echo "configure:2438: checking for sun" >&5 +echo "configure:2496: checking for sun" >&5 cat > conftest.$ac_ext <&6 -echo "configure:2464: checking for solaris" >&5 +echo "configure:2522: checking for solaris" >&5 if test ! -f /vmunix; then is_solaris=yes RPLAY_TARGET="solaris" @@ -2473,9 +2531,9 @@ if test -z "$RPLAY_TARGET"; then echo $ac_n "checking for linux""... $ac_c" 1>&6 -echo "configure:2477: checking for linux" >&5 +echo "configure:2535: checking for linux" >&5 cat > conftest.$ac_ext <&6 -echo "configure:2505: checking for hpux" >&5 +echo "configure:2563: checking for hpux" >&5 cat > conftest.$ac_ext <&6 -echo "configure:2533: checking for sgi" >&5 +echo "configure:2591: checking for sgi" >&5 cat > conftest.$ac_ext <&6 -echo "configure:2557: checking for multimedia development kit" >&5 +echo "configure:2615: checking for multimedia development kit" >&5 for ac_hdr in audio.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2562: checking for $ac_hdr" >&5 +echo "configure:2620: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2572: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2630: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2604,12 +2662,12 @@ if test -z "$RPLAY_TARGET"; then echo $ac_n "checking for FreeBSD""... $ac_c" 1>&6 -echo "configure:2608: checking for FreeBSD" >&5 +echo "configure:2666: checking for FreeBSD" >&5 cat > conftest.$ac_ext < */ +#define _GNU_SOURCE +#define __USE_GNU + #ifdef HAVE_CONFIG_H #include "config.h" #endif @@ -34,6 +37,7 @@ #include #include #include +#include #include #include #include @@ -56,6 +60,7 @@ static int dsp_speed; static int dsp_blksize; static int streaming; +static int opened; static char * getsound() @@ -95,12 +100,35 @@ if (strcmp(pathname, "/dev/dsp") == 0) { + char response[RPTP_MAX_LINE]; + char *acc; + rplay_fd = rptp_open(rplay_default_host(), RPTP_PORT, response, sizeof(response)); if (rplay_fd < 0) { rptp_perror(rplay_default_host()); } + else + { + rptp_putline(rplay_fd, "access"); + rptp_getline(rplay_fd, response, sizeof(response)); + acc = rptp_parse(response, "access"); + + if (!acc || !strchr(acc, 'w')) + { + fprintf(stderr, + "RPLAY-ERROR: please add 'w' to rplay.hosts or man rplay.hosts\n"); + errno = EACCES; + close(rplay_fd); + rplay_fd = -1; + } + else + { + opened = 1; + } + } + return rplay_fd; } else @@ -158,6 +186,7 @@ break; } + /* if (spool_id == -1 && dsp_fmt && dsp_speed && dsp_channels) { char response[RPTP_MAX_LINE]; @@ -174,11 +203,18 @@ getsound()); rptp_getline(rplay_fd, response, sizeof(response)); + if (response[0] != RPTP_OK) + { + errno = EINVAL; + return -1; + } + spool_id = atoi(1 + rptp_parse(response, "id")); rptp_putline(rplay_fd, "put id=#%d size=0", spool_id); rptp_getline(rplay_fd, response, sizeof(response)); } + */ return 0; } @@ -214,7 +250,7 @@ if (!func) func = (int (*)(int, const void *, size_t)) dlsym(REAL_LIBC, "write"); - if (fd == rplay_fd && !streaming) + if (fd == rplay_fd && !streaming && opened) { char info[64]; char response[RPTP_MAX_LINE]; @@ -241,7 +277,7 @@ } /* otherwise let rplayd figure out the format using the sound header and/or name. */ - + streaming = 1; rptp_putline(rplay_fd, "play input=flow %s sound=\"%s\"", info, getsound()); @@ -269,6 +305,7 @@ rplay_fd = -1; spool_id = -1; streaming = 0; + opened = 0; dsp_fmt = dsp_speed = dsp_channels = dsp_speed = dsp_blksize = 0; } Index: rplay/etc/rplay.hosts =================================================================== --- rplay.orig/etc/rplay.hosts 2024-08-08 09:34:14.963482455 +0200 +++ rplay/etc/rplay.hosts 2024-08-08 09:34:14.955482448 +0200 @@ -1,5 +1,6 @@ -# Sample rplay.hosts -# -# this file describes what machines can read from or write to this server -# *:rwx -# would allow anyone to read or write to this server. +# default rplay.hosts +# see the rplay.hosts(5) for details on the format and meaning of this +# file + +# give the localhost the default permissions +localhost Index: rplay/etc/rplay.helpers =================================================================== --- rplay.orig/etc/rplay.helpers 2024-08-08 09:34:14.963482455 +0200 +++ rplay/etc/rplay.helpers 2024-08-08 09:34:14.955482448 +0200 @@ -3,7 +3,6 @@ # # ## MPEG -\.mp[1-3]$ linear16,44100,16,2,little-endian /usr/bin/mpg123 --stdout --quiet --rate 44100 --stereo - +\.mp[1-3]$ linear16,44100,16,2,little-endian /usr/bin/mpg123 --stdout --quiet --rate 44100 --stereo - -## MODS -#\.\(669\|alm\|amd\|far\|mod\|mtm\|okt\|ptm\|rad\|s3m\|stm\|wow\|xm\)$ linear16,44100,16,2,little-endian /usr/local/bin/xmp --stereo --little-endian -b 16 -f 44100 --stdout --nocmd /dev/fd/0 +\.ogg$ linear16,44100,16,2,little-endian /usr/bin/ogg123 -q -d raw -o byteorder:little -f - /dev/fd/0 Index: rplay/include/config.h.in =================================================================== --- rplay.orig/include/config.h.in 2024-08-08 09:34:14.963482455 +0200 +++ rplay/include/config.h.in 2024-08-08 09:34:14.955482448 +0200 @@ -40,7 +40,7 @@ /* * Use host authentication. */ -#define AUTH +#define AUTH /* * Support rplay 2.0 packets. If you define this then you @@ -75,7 +75,7 @@ * 1 - System and rplayd errors. * 2 - + RPTP connections, get, put, find. * 3 - + play, stop, pause, continue, etc. - * 4 - + Debug messages. + * 4 - + Debug messages. * * Note that the logging level can also be specified with * rplayd command line options. This is only used if @@ -192,6 +192,7 @@ #undef HAVE_LIBREADLINE #undef HAVE_RANDOM #undef HAVE_SRANDOM +#undef HAVE_REGCOMP #undef HAVE_STDC_HEADERS #undef HAVE_MEMORY_H @@ -207,6 +208,7 @@ #undef HAVE_GSM_H #undef HAVE_GSM_GSM_H +#undef HAVE_REGEX_H #undef HAVE_RXPOSIX_H #undef HAVE_RX_RXPOSIX_H Index: rplay/librplay/Makefile.in =================================================================== --- rplay.orig/librplay/Makefile.in 2024-08-08 09:34:14.963482455 +0200 +++ rplay/librplay/Makefile.in 2024-08-08 09:34:14.955482448 +0200 @@ -9,7 +9,7 @@ MKINSTALLDIRS= @srcdir@/../mkinstalldirs CPPFLAGS= $(CC_OPTIONS) -I. -I../include -I@srcdir@/../include @DEFS@ -LDFLAGS= $(LD_OPTIONS) -shared @LDFLAGS@ +LDFLAGS= $(LD_OPTIONS) -shared -Xlinker -soname -Xlinker librplay.so.3 @LDFLAGS@ .c.o: $(CC) -c $(CPPFLAGS) $(CFLAGS) $< @@ -33,7 +33,10 @@ $(RANLIB) $@ librplay.so: $(SHAREDOBJS) - $(CC) -o $@ $(SHAREDOBJS) $(LDFLAGS) + $(CC) -o $@.@RPLAY_VERSION@ $(SHAREDOBJS) $(LDFLAGS) + ln -fs $@.@RPLAY_VERSION@ $@.3 + ln -fs $@.@RPLAY_VERSION@ $@ + # # For HP-UX comment above and uncomment below. @@ -50,14 +53,16 @@ install: all $(MKINSTALLDIRS) $(libdir) $(INSTALL_DATA) $(TARGET) $(libdir) - $(INSTALL_DATA) librplay.so $(libdir) + $(INSTALL_DATA) librplay.so.@RPLAY_VERSION@ $(libdir) + (cd $(libdir) && ln -s librplay.so.@RPLAY_VERSION@ librplay.so.3) + (cd $(libdir) && ln -s librplay.so.@RPLAY_VERSION@ librplay.so) uninstall: $(RM) $(libdir)/$(TARGET) $(RM) $(libdir)/librplay.so clean: - $(RM) $(OBJS) $(SHAREDOBJS) $(TARGET) librplay.so a.out core *~ *.bak *.orig TAGS + $(RM) $(OBJS) $(SHAREDOBJS) $(TARGET) librplay.so* a.out core *~ *.bak *.orig TAGS distclean: clean $(RM) Makefile Index: rplay/perl/RPlay.pm =================================================================== --- rplay.orig/perl/RPlay.pm 2024-08-08 09:34:14.963482455 +0200 +++ rplay/perl/RPlay.pm 2024-08-08 09:34:14.955482448 +0200 @@ -44,8 +44,8 @@ my ($that_host, $that_port) = @_; my ($pat, $name, $aliases, $proto, $port, $udp); my (@bytes, $addrtype, $length, $old); - my ($that, $that_addr, $that_addr); - my ($this, $this_addr, $this_addr); + my ($that, $that_addr); + my ($this, $this_addr); $sockaddr = 'S n a4 x8'; Index: rplay/rplay/rplay.c =================================================================== --- rplay.orig/rplay/rplay.c 2024-08-08 09:34:14.963482455 +0200 +++ rplay/rplay/rplay.c 2024-08-08 09:34:14.959482451 +0200 @@ -42,6 +42,11 @@ #define OPTIONS "+spcN:P:h:rv:n:R:b:i:" +/* Make sure MAXPATHLEN is defined. */ +#ifndef MAXPATHLEN +#define MAXPATHLEN 4096 +#endif + struct option longopts[] = { {"continue", no_argument, NULL, 'c'}, Index: rplay/rplayd/sound.c =================================================================== --- rplay.orig/rplayd/sound.c 2024-08-08 09:34:14.963482455 +0200 +++ rplay/rplayd/sound.c 2024-08-08 09:34:14.959482451 +0200 @@ -64,6 +64,9 @@ #ifdef HAVE_HELPERS #include "helper.h" #endif /* HAVE_HELPERS */ +#ifdef HAVE_REGEX_H +#include +#else #ifdef HAVE_RX_RXPOSIX_H #include #else @@ -73,6 +76,12 @@ #include "rxposix.h" #endif #endif +#endif + +/* Make sure MAXPATHLEN is defined. */ +#ifndef MAXPATHLEN +#define MAXPATHLEN 4096 +#endif SOUND *sounds = NULL; int sound_count = 0; @@ -143,9 +152,9 @@ //memset ((char *) &bad_dirs, 0, sizeof (bad_dirs)); - if (regncomp(&bad_dirs, buf, strlen(buf), REG_ICASE | REG_NOSUB)) + if (regcomp(&bad_dirs, buf, REG_ICASE | REG_NOSUB)) { - report(REPORT_ERROR, "bad_dirs: regncomp failed\n"); + report(REPORT_ERROR, "bad_dirs: regcomp failed\n"); done(1); } @@ -162,7 +171,7 @@ #endif { /* return 1 if bad */ - return regnexec(&bad_dirs, dir, strlen(dir), 0, 0, 0) ? 0 : 1; + return regexec(&bad_dirs, dir, 0, 0, 0) ? 0 : 1; } #endif /* BAD_DIRS */ Index: rplay/rplayd/sound.h =================================================================== --- rplay.orig/rplayd/sound.h 2024-08-08 09:34:14.963482455 +0200 +++ rplay/rplayd/sound.h 2024-08-08 09:34:14.959482451 +0200 @@ -170,9 +170,9 @@ int gsm_bit_frame_bytes; /* Number of bytes in gsm_bit_frame */ int gsm_fixed_buffer_size; #endif /* HAVE_GSM */ -#ifdef HAVE_CDROM +#if defined(HAVE_CDROM) || defined(HAVE_HELPERS) int pid; -#endif /* HAVE_CDROM */ +#endif /* HAVE_CDROM || HAVE_HELPERS */ } SINDEX; Index: rplay/rplayd/helper.h =================================================================== --- rplay.orig/rplayd/helper.h 2024-08-08 09:34:14.963482455 +0200 +++ rplay/rplayd/helper.h 2024-08-08 09:34:14.959482451 +0200 @@ -26,6 +26,9 @@ #ifdef HAVE_HELPERS +#ifdef HAVE_REGEX_H +#include +#else #ifdef HAVE_RX_RXPOSIX_H #include #else @@ -35,6 +38,7 @@ #include "rxposix.h" #endif #endif +#endif typedef struct _helper { Index: rplay/rplayd/rplayd.h =================================================================== --- rplay.orig/rplayd/rplayd.h 2024-08-08 09:34:14.963482455 +0200 +++ rplay/rplayd/rplayd.h 2024-08-08 09:34:14.959482451 +0200 @@ -73,7 +73,6 @@ extern fd_set read_mask; extern fd_set write_mask; extern int debug; -extern int inetd; extern int rptp_timeout; extern char hostname[]; extern char *hostaddr; @@ -133,7 +132,7 @@ extern int monitor_count; extern BUFFER *monitor_buffers; -extern int errno; +#include #ifdef __STDC__ extern void usage (); Index: rplay/rplayd/helper.c =================================================================== --- rplay.orig/rplayd/helper.c 2024-08-08 09:34:14.963482455 +0200 +++ rplay/rplayd/helper.c 2024-08-08 09:34:14.959482451 +0200 @@ -43,6 +43,11 @@ #include "helper.h" #include "misc.h" +/* Make sure MAXPATHLEN is defined. */ +#ifndef MAXPATHLEN +#define MAXPATHLEN 4096 +#endif + HELPER *helpers = NULL; static time_t helper_read_time; @@ -110,7 +115,7 @@ done(1); } //memset ((char *) &hp->pattern, 0, sizeof (hp->pattern)); - error = regncomp(&hp->pattern, pat, strlen(pat), REG_ICASE | REG_NOSUB); + error = regcomp(&hp->pattern, pat, REG_ICASE | REG_NOSUB); if (error) { report(REPORT_ERROR, "helper_read: %d line %d\n", error, line); @@ -188,7 +193,7 @@ for (hp = helpers; hp; hp = hp->next) { - if (regnexec(&hp->pattern, sound, strlen(sound), 0, 0, 0) == 0) + if (regexec(&hp->pattern, sound, 0, 0, 0) == 0) { return hp; } Index: rplay/rplayd/native.c =================================================================== --- rplay.orig/rplayd/native.c 2024-08-08 09:34:14.963482455 +0200 +++ rplay/rplayd/native.c 2024-08-08 09:34:14.959482451 +0200 @@ -22,7 +22,7 @@ */ - +#include #ifdef HAVE_CONFIG_H #include "config.h" #endif Index: rplay/rplayd/rplayd.c =================================================================== --- rplay.orig/rplayd/rplayd.c 2024-08-08 09:34:14.963482455 +0200 +++ rplay/rplayd/rplayd.c 2024-08-08 09:34:14.959482451 +0200 @@ -333,6 +333,9 @@ progname = argv[0]; + /* no need to keep stdin around */ + close(0); + servers_file = tilde_expand(RPLAY_SERVERS); #ifdef HAVE_HELPERS helpers_file = tilde_expand(RPLAY_HELPERS); @@ -1466,7 +1469,7 @@ char *buf = rplay_audio_buf; int size = rplay_audio_size; int n; - + while (size) { n = MIN(BUFFER_SIZE - monitor_buffers->offset, size); @@ -1483,7 +1486,7 @@ } } } - + rplay_audio_size = 0; /* Flush when the audio stream has ended. */ Index: rplay/rplayd/spool.c =================================================================== --- rplay.orig/rplayd/spool.c 2024-08-08 09:34:14.963482455 +0200 +++ rplay/rplayd/spool.c 2024-08-08 09:34:14.959482451 +0200 @@ -43,6 +43,11 @@ #include "flange.h" #endif +/* Make sure MAXPATHLEN is defined. */ +#ifndef MAXPATHLEN +#define MAXPATHLEN 4096 +#endif + SPOOL *spool = NULL; /* List of spool entries. */ int spool_size = 0; /* Number of entries in the spool. */ int spool_nplaying = 0; /* Number of playing sounds. */ @@ -1127,8 +1132,8 @@ spool_flow_pause(sp); } } -#endif /* HAVE_CDROM */ } +#endif /* HAVE_CDROM */ } else { Index: rplay/rplayd/xhash.c =================================================================== --- rplay.orig/rplayd/xhash.c 2024-08-08 09:34:14.963482455 +0200 +++ rplay/rplayd/xhash.c 2024-08-08 09:34:14.959482451 +0200 @@ -36,6 +36,11 @@ #include "hash.h" #include "rplayd.h" +/* Make sure MAXPATHLEN is defined. */ +#ifndef MAXPATHLEN +#define MAXPATHLEN 4096 +#endif + static struct hash_control *htable; #ifdef DEBUG Index: rplay/rplayd/cache.c =================================================================== --- rplay.orig/rplayd/cache.c 2024-08-08 09:34:14.963482455 +0200 +++ rplay/rplayd/cache.c 2024-08-08 09:34:14.959482451 +0200 @@ -47,6 +47,11 @@ #include "spool.h" #include "cache.h" +/* Make sure MAXPATHLEN is defined. */ +#ifndef MAXPATHLEN +#define MAXPATHLEN 4096 +#endif + static DIR *cache_dir; static char cache_path[MAXPATHLEN]; static char cache_directory[MAXPATHLEN]; Index: rplay/rplayd/host.c =================================================================== --- rplay.orig/rplayd/host.c 2024-08-08 09:34:14.963482455 +0200 +++ rplay/rplayd/host.c 2024-08-08 09:34:14.959482451 +0200 @@ -33,6 +33,9 @@ #include "host.h" #include "buffer.h" #include "misc.h" +#ifdef HAVE_REGEX_H +#include +#else #ifdef HAVE_RX_RXPOSIX_H #include #else @@ -42,6 +45,7 @@ #include "rxposix.h" #endif #endif +#endif #ifdef AUTH @@ -197,35 +201,31 @@ } strcat(expr_monitor, "$"); - error = regncomp(&access_read, expr_read, strlen(expr_read), - REG_ICASE | REG_NOSUB); + error = regcomp(&access_read, expr_read, REG_ICASE | REG_NOSUB); if (error) { - report(REPORT_ERROR, "host_read: regncomp: %d\n", error); + report(REPORT_ERROR, "host_read: regcomp: %d\n", error); done(1); } - error = regncomp(&access_write, expr_write, strlen(expr_write), - REG_ICASE | REG_NOSUB); + error = regcomp(&access_write, expr_write, REG_ICASE | REG_NOSUB); if (error) { - report(REPORT_ERROR, "host_read: regncomp: %d\n", error); + report(REPORT_ERROR, "host_read: regcomp: %d\n", error); done(1); } - error = regncomp(&access_execute, expr_execute, strlen(expr_execute), - REG_ICASE | REG_NOSUB); + error = regcomp(&access_execute, expr_execute, REG_ICASE | REG_NOSUB); if (error) { - report(REPORT_ERROR, "host_read: regncomp: %d\n", error); + report(REPORT_ERROR, "host_read: regcomp: %d\n", error); done(1); } - error = regncomp(&access_monitor, expr_monitor, strlen(expr_monitor), - REG_ICASE | REG_NOSUB); + error = regcomp(&access_monitor, expr_monitor, REG_ICASE | REG_NOSUB); if (error) { - report(REPORT_ERROR, "host_read: regncomp: %d\n", error); + report(REPORT_ERROR, "host_read: regcomp: %d\n", error); done(1); } } @@ -432,7 +432,7 @@ done(1); } - n = regnexec(re, p, strlen(p), 0, 0, 0); + n = regexec(re, p, 0, 0, 0); return !n; } Index: rplay/rplayd/timer.c =================================================================== --- rplay.orig/rplayd/timer.c 2024-08-08 09:34:14.963482455 +0200 +++ rplay/rplayd/timer.c 2024-08-08 09:34:14.959482451 +0200 @@ -29,6 +29,7 @@ #include #include #include +#include #include "rplayd.h" #include "timer.h" Index: rplay/rplayd/Makefile.in =================================================================== --- rplay.orig/rplayd/Makefile.in 2024-08-08 09:34:14.963482455 +0200 +++ rplay/rplayd/Makefile.in 2024-08-08 09:34:14.959482451 +0200 @@ -25,7 +25,7 @@ $(CC) -c $(CPPFLAGS) $(CFLAGS) $< LDFLAGS= $(LD_OPTIONS) -L../librplay -lrplay -L../lib -lrp \ - -L../adpcm -ladpcm @GSM_LIBS@ -L../rx -lrx @LDFLAGS@ @LIBS@ -lm + -L../adpcm -ladpcm @GSM_LIBS@ @RX_LIBS@ @LDFLAGS@ @LIBS@ -lm TARGET= rplayd @@ -54,7 +54,7 @@ install: all $(MKINSTALLDIRS) $(sbindir) $(INSTALL_PROGRAM) $(TARGET) $(sbindir)/$(TARGET) - @test -x $(bindir)/$(TARGET) && echo "" && echo " Note: Consider removing $(bindir)/$(TARGET)" && echo "" + @(test -x $(bindir)/$(TARGET) && echo "" && echo " Note: Consider removing $(bindir)/$(TARGET)" && echo "") || true uninstall: $(RM) $(bindir)/$(TARGET) Index: rplay/rplayd/audio/audio_FreeBSD.c =================================================================== --- rplay.orig/rplayd/audio/audio_FreeBSD.c 2024-08-08 09:34:14.963482455 +0200 +++ rplay/rplayd/audio/audio_FreeBSD.c 2024-08-08 09:34:14.959482451 +0200 @@ -35,7 +35,7 @@ #include #include #include -#include +#include /* * for the poor folks who don't have a sound card, but use the pc speaker Index: rplay/rplayd/audio/audio_gnu.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ rplay/rplayd/audio/audio_gnu.h 2024-08-08 09:34:14.959482451 +0200 @@ -0,0 +1,37 @@ +/* $Id: audio_generic.h,v 1.3 1999/03/10 07:58:10 boyns Exp $ */ + +/* + * Copyright (C) 1993-99 Mark R. Boyns + * + * This file is part of rplay. + * + * rplay is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * rplay 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with rplay; see the file COPYING. If not, write to the + * Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + */ + + + +#ifndef _audio_generic_h +#define _audio_generic_h + +#include "rplay.h" + +#define RPLAY_AUDIO_DEVICE "/dev/audio" +#define RPLAY_AUDIO_TIMEOUT 5 +#define RPLAY_AUDIO_FLUSH_TIMEOUT -1 +#define RPLAY_AUDIO_RATE 10 +#define RPLAY_AUDIO_BYTE_ORDER RPLAY_BIG_ENDIAN + +#endif /* _audio_generic_h */ Index: rplay/rplayd/audio/audio_gnu.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ rplay/rplayd/audio/audio_gnu.c 2024-08-08 09:34:14.959482451 +0200 @@ -0,0 +1,287 @@ +/* $Id: audio_generic.c,v 1.5 1999/03/10 07:58:10 boyns Exp $ */ + +/* + * Copyright (C) 1993-99 Mark R. Boyns + * + * This file is part of rplay. + * + * rplay is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * rplay 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with rplay; see the file COPYING. If not, write to the + * Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + */ + + + +#include "rplayd.h" + +/* + * System audio include files: + */ +#include +#include +#include +#ifdef ultrix +#include +#else +#include +#endif +#include + +/* + * External variables: + */ +extern char *rplay_audio_device; +extern int rplay_audio_sample_rate; +extern int rplay_audio_channels; +extern int rplay_audio_precision; +extern int rplay_audio_format; +extern int rplay_audio_port; +extern int optional_sample_rate; +extern int optional_precision; +extern int optional_channels; +extern int optional_format; +extern int optional_port; + +/* + * Internal variables: + */ +static int rplay_audio_fd = -1; + +static RPLAY_AUDIO_TABLE generic_table[] = +{ + {8000, RPLAY_FORMAT_ULAW, 1, 1}, + {0, 0, 0, 0} +}; + +/* + * Initialize the audio device. + * This routine must set the following external variables: + * rplay_audio_sample_rate + * rplay_audio_precision + * rplay_audio_channels + * rplay_audio_format + * rplay_audio_port + * + * and may use the following optional parameters: + * optional_sample_rate + * optional_precision + * optional_channels + * optional_format + * optional_port + * + * optional_* variables with values of zero should be ignored. + * + * Return 0 on success and -1 on error. + */ +int +rplay_audio_init() +{ + if (rplay_audio_fd == -1) + { + rplay_audio_open(); + if (rplay_audio_fd == -1) + { + report(REPORT_ERROR, "rplay_audio_init: cannot open %s\n", + rplay_audio_device); + return -1; + } + } + + rplay_audio_sample_rate = 8000; + rplay_audio_precision = 8; + rplay_audio_channels = 1; + rplay_audio_format = RPLAY_FORMAT_ULAW; + rplay_audio_port = RPLAY_AUDIO_PORT_SPEAKER; + rplay_audio_table = generic_table; + + return 0; +} + +/* + * Open the audio device. + * + * Return 0 on success and -1 on error. + */ +int +rplay_audio_open() +{ + int flags; + + rplay_audio_fd = open(rplay_audio_device, O_WRONLY | O_NDELAY, 0); + if (rplay_audio_fd < 0) + { + return -1; + } + + if (fcntl(rplay_audio_fd, F_SETFD, 1) < 0) + { + report(REPORT_ERROR, + "rplay_audio_open: close-on-exec %d\n", + sys_err_str(errno)); + /* return -1; */ + } + + if (rplay_audio_init() < 0) + { + return -1; + } + + /* + * Make sure the audio device writes are non-blocking. + */ + flags = fcntl(rplay_audio_fd, F_GETFL, 0); + if (flags < 0) + { + return -1; + } + flags |= FNDELAY; + if (fcntl(rplay_audio_fd, F_SETFL, flags) < 0) + { + return -1; + } + + return 0; +} + +/* + * Is the audio device open? + * + * Return 1 for true and 0 for false. + */ +int +rplay_audio_isopen() +{ + return rplay_audio_fd != -1; +} + +/* + * Flush the audio device. + * + * Return 0 on success and -1 on error. + */ +int +rplay_audio_flush() +{ + return 0; +} + +/* + * Write nbytes from buf to the audio device. + * + * Return the number of bytes written on success and -1 on error. + */ +#ifdef __STDC__ +int +rplay_audio_write(char *buf, int nbytes) +#else +int +rplay_audio_write(buf, nbytes) + char *buf; + int nbytes; +#endif +{ + int n, nleft, nwritten; + char *p; + + nleft = nbytes; + nwritten = 0; + + for (p = buf; nleft > 0; nleft -= n, p += n) + { + n = write(rplay_audio_fd, p, nleft); + if (n < 0) + { + if (errno == EWOULDBLOCK) + { + return nwritten; + } + else if (errno != EINTR) + { + return -1; + } + n = 0; + } + else + { + nwritten += n; + } + } + + return nwritten; +} + +/* + * Close the audio device. + * + * Return 0 on success and -1 on error. + */ +int +rplay_audio_close() +{ + if (rplay_audio_fd != -1) + { + close(rplay_audio_fd); + } + + rplay_audio_fd = -1; + + return 0; +} + +/* + * Return the volume of the audio device. + * + * Return 0-255 or -1 on error. + */ +int +rplay_audio_get_volume() +{ +#ifdef FAKE_VOLUME + return rplay_audio_volume; +#else /* not FAKE_VOLUME */ + return -1; +#endif /* not FAKE_VOLUME */ +} + +/* + * Set the volume of the audio device. + * Input should be 0-255. + * + * Return the volume of the audio device 0-255 or -1. + */ +#ifdef __STDC__ +int +rplay_audio_set_volume(int volume) +#else +int +rplay_audio_set_volume(volume) + int volume; +#endif +{ +#ifdef FAKE_VOLUME + if (volume < RPLAY_MIN_VOLUME) + { + volume = RPLAY_MIN_VOLUME; + } + else if (volume > RPLAY_MAX_VOLUME) + { + volume = RPLAY_MAX_VOLUME; + } + rplay_audio_volume = volume; + + return rplay_audio_volume; +#else /* not FAKE_VOLUME */ + return -1; +#endif /* not FAKE_VOLUME */ +} Index: rplay/rptp/rptp.c =================================================================== --- rplay.orig/rptp/rptp.c 2024-08-08 09:34:14.963482455 +0200 +++ rplay/rptp/rptp.c 2024-08-08 09:34:14.959482451 +0200 @@ -532,6 +532,8 @@ printf("help Display help information.\n"); printf("info Display sound information.\n"); printf("list Display various server information.\n"); + printf("monitor Monitor the audio output of rplayd.\n"); + printf(" Requires \"m\" permission in rplay.hosts\n"); printf("open Connect to a server.\n"); printf("pause Pause sounds that are playing.\n"); printf("play Play sounds\n"); @@ -783,7 +785,7 @@ } fwrite(rptp_buf, 1, n, fp); size -= n; - + sprintf(line, "\r%s %d/%d %d%%", filename, total_size - size, total_size, (int)(((float)(total_size-size)/total_size)*100)); @@ -1018,7 +1020,7 @@ char line[80]; int n, size; int sample_rate, precision, channels, sample_size; - + if (!connected()) { return;