Re: Patch to build against latest ucommon
David Sugar <[email protected]> Fri, 4 Oct 2013 14:28:11 -0400
| Newsgroups | gmane.comp.gnu.ccaudio.devel |
|---|---|
| Organization | GNU Telephony, http://www.gnutelephony.org |
| Message-ID | <20131004182811.GA31055@tycho> |
--===============7056418115533148118==
Content-Type: multipart/signed; micalg=pgp-sha1;
protocol="application/pgp-signature"; boundary="RnlQjJ0d97Da+TV1"
Content-Disposition: inline
--RnlQjJ0d97Da+TV1
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
And "fsys::load" should be used instead of dir.load...
Brandon Invergo wrote:
> Hi,
>=20
> 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).
>=20
> Cheers,
> Brandon
>=20
> diff -x config.log -x config.status -ru work/ccaudio2-2.0.5/src/friends.c=
pp work/ccaudio2-2.0.5/src/friends.cpp
> --- 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 +02=
00
> @@ -1186,16 +1186,16 @@
> if(!dp)
> return;
> =20
> - fsys::open(dir, dp, fsys::ACCESS_DIRECTORY);
> + dir.open(dp, fsys::DEVICE);
> =20
> - 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);
> - fsys::load(path);
> + dir.load(path);
> }
> - fsys::close(dir);
> + dir.close();
> #endif
> }
> =20
> diff -x config.log -x config.status -ru work/ccaudio2-2.0.5/utils/audioto=
ol.cpp work/ccaudio2-2.0.5/utils/audiotool.cpp
> --- 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) {
> - if(!fsys::isfile(*argv)) {
> + if(!fsys::is_file(*argv)) {
> printf("%s: %s\n",
> fname(*(argv++)), _TEXT("invalid"));
> continue;
> }
> - 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) {
> - if(!fsys::isfile(*argv)) {
> + if(!fsys::is_file(*argv)) {
> printf("audiotool: %s: %s\n",
> fname(*(argv++)), _TEXT("invalid"));
> continue;
> }
> - 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) {
> - if(!fsys::isfile(*argv)) {
> + if(!fsys::is_file(*argv)) {
> printf("%s: %s\n",
> *(argv++), _TEXT("invalid"));
> continue;
> }
> - 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) {
> - if(!fsys::isfile(*argv)) {
> + if(!fsys::is_file(*argv)) {
> printf("%s: %s\n",
> *(argv++), _TEXT("invalid"));
> continue;
> }
> - if(fsys::access(*argv, R_OK)) {
> + if(fsys::is_readable(*argv)) {
> printf("%s: %s\n",
> *(argv++), _TEXT("inaccessable"));
> continue;
>=20
>=20
>=20
> --=20
> Brandon Invergo
> http://brandon.invergo.net
> _______________________________________________
> Ccaudio-devel mailing list
> [email protected]
> https://lists.gnu.org/mailman/listinfo/ccaudio-devel
--RnlQjJ0d97Da+TV1
Content-Type: application/pgp-signature
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.21 (GNU/Linux)
iEYEARECAAYFAlJPCLsACgkQ/FMSCeqIiK3j5QCfbE/LXMfmeoayZfCjZbf0LkxR
ImwAn0EJRQTw0MAfeXMa7l2kuWQX2HJY
=Pj6p
-----END PGP SIGNATURE-----
--RnlQjJ0d97Da+TV1--
--===============7056418115533148118==
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
--===============7056418115533148118==--