Patch to build against latest ucommon

Brandon Invergo <[email protected]> Fri, 04 Oct 2013 13:58:07 +0200
Newsgroups gmane.comp.gnu.ccaudio.devel
Organization GNU
Message-ID <[email protected]>
--===============7640683070023012771==
Content-Type: multipart/signed; boundary="==-=-=";
	micalg=pgp-sha1; protocol="application/pgp-signature"

--==-=-=
Content-Type: multipart/mixed; boundary="=-=-="

--=-=-=
Content-Type: text/plain

Hi,

ccAudio 2.05 fails to build against the latest uCommon versions.  I've
attached a patch that at least fixes the build in the GNU Source Release
Collection (GSRC).  Please double-check that I had the right ideas
(i.e. in friends.cpp, Audio::init, opening the directory as a DEVICE).

Cheers,
Brandon


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment; filename=ccaudio2-2.0.5-ucommon-fixes.diff
Content-Transfer-Encoding: quoted-printable

diff -x config.log -x config.status -ru work/ccaudio2-2.0.5/src/friends.cpp=
 work/ccaudio2-2.0.5/src/friends.cpp
=2D-- work/ccaudio2-2.0.5/src/friends.cpp	2011-03-21 08:16:40.000000000 +01=
00
+++ work/ccaudio2-2.0.5/src/friends.cpp	2013-10-04 13:36:06.926539405 +0200
@@ -1186,16 +1186,16 @@
     if(!dp)
         return;
=20
=2D    fsys::open(dir, dp, fsys::ACCESS_DIRECTORY);
+    dir.open(dp, fsys::DEVICE);
=20
=2D    while(is(dir) && fsys::read(dir, filename, sizeof(filename)) > 0) {
+    while(is(dir) && dir.read(filename, sizeof(filename)) > 0) {
         if(filename[0] =3D=3D '.')
             continue;
=20
         snprintf(path, sizeof(path), "%s/%s", dp, filename);
=2D        fsys::load(path);
+        dir.load(path);
     }
=2D    fsys::close(dir);
+    dir.close();
 #endif
 }
=20
diff -x config.log -x config.status -ru work/ccaudio2-2.0.5/utils/audiotool=
.cpp work/ccaudio2-2.0.5/utils/audiotool.cpp
=2D-- work/ccaudio2-2.0.5/utils/audiotool.cpp	2011-03-21 08:16:40.000000000=
 +0100
+++ work/ccaudio2-2.0.5/utils/audiotool.cpp	2013-10-04 13:50:13.662811477 +=
0200
@@ -401,12 +401,12 @@
         framing =3D 20;
=20
     while(*argv) {
=2D        if(!fsys::isfile(*argv)) {
+        if(!fsys::is_file(*argv)) {
             printf("%s: %s\n",
                 fname(*(argv++)), _TEXT("invalid"));
             continue;
         }
=2D        if(fsys::access(*argv, R_OK)) {
+        if(!fsys::is_readable(*argv)) {
             printf("%s: %s\n",
                 fname(*(argv++)), _TEXT("inaccessable"));
             continue;
@@ -530,12 +530,12 @@
     }
=20
     while(*argv) {
=2D        if(!fsys::isfile(*argv)) {
+        if(!fsys::is_file(*argv)) {
             printf("audiotool: %s: %s\n",
                 fname(*(argv++)), _TEXT("invalid"));
             continue;
         }
=2D        if(fsys::access(*argv, R_OK)) {
+        if(fsys::is_readable(*argv)) {
             printf("audiotool: %s: %s\n",
                 fname(*(argv++)), _TEXT("inaccessable"));
             continue;
@@ -682,12 +682,12 @@
         framing =3D 20;
=20
     while(*argv) {
=2D        if(!fsys::isfile(*argv)) {
+        if(!fsys::is_file(*argv)) {
             printf("%s: %s\n",
                 *(argv++), _TEXT("invalid"));
             continue;
         }
=2D        if(fsys::access(*argv, R_OK)) {
+        if(fsys::is_readable(*argv)) {
             printf("%s: %s\n",
                 *(argv++), _TEXT("inaccessable"));
             continue;
@@ -881,12 +881,12 @@
         framing =3D 20;
=20
     while(*argv) {
=2D        if(!fsys::isfile(*argv)) {
+        if(!fsys::is_file(*argv)) {
             printf("%s: %s\n",
                 *(argv++), _TEXT("invalid"));
             continue;
         }
=2D        if(fsys::access(*argv, R_OK)) {
+        if(fsys::is_readable(*argv)) {
             printf("%s: %s\n",
                 *(argv++), _TEXT("inaccessable"));
             continue;

--=-=-=
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable




=2D-=20
Brandon Invergo
http://brandon.invergo.net

--=-=-=--

--==-=-=
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.21 (GNU/Linux)

iQEcBAEBAgAGBQJSTq1RAAoJEARu3ubrerdN9HsIALNk0mCMrUNi08TBVDvHOaZv
l6x6+N9x2Q5JD+rAAbkXP/YCwdE/TfPEYuDXP1RUuEoptQ+sZPKB4YFCP3MOeMT+
mthm9wtlQbbmdDraaPhmPkWyQWuLpq9cEAfCCdf+hhKjUFCS2zGQ/lmKLpYzSv6L
9PGnDCuEKB9TOLyYN6+RHhFd6tjfJeH8ofvb4gZfS1ZxNJupxQ8/a2/N1IXnMe2K
PysFUtaHNdoy/PsUk/jGFEMQ+lmbNdNV6X/wzOnzAVz8cI1aImEmp6Zw+/yOITy5
UQm79d0CPFaHu78elsCGge3qMGqLE/MsOjlp6VtUNt/Ox2e3SA9g28aZN844Fxs=
=zad8
-----END PGP SIGNATURE-----
--==-=-=--


--===============7640683070023012771==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Ccaudio-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/ccaudio-devel

--===============7640683070023012771==--