-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 With these one can build 2.4-beta (AKA 2.3.99.0) with mingw32 (gcc-4.7.0). Note, however, that win32 subdirectory is: 1) Lacking a complete Makefile.am, so it can't be built with autotools. 2) Depends on MFC, and MFC is not provided by any MinGW toolset (and MS' MFC is, most likely, highly incompatible with MinGW). So you only get a console binary. If someone has some free, maybe w32 GUI part of icecast could be ported to GTK+? If that is too difficult, just allowing icecast to be run as a service and be able to dump its statistics into a socket or pipe should be enough - separate GUI can be hooked up to that. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (MingW32) Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ iQEcBAEBAgAGBQJQbAEPAAoJEOs4Jb6SI2CweDQIAMbsylyScn4sVUWXJGCjrxv1 zQF3S5U+dWKHts7Q1q3SBOys+fIA2IWviuq0PRTh8smFb/GGdpmPJs5ti0DRhFiQ Ylef5Zk5Hbx2BmKdJRcVtwl5xEU28nYkxZ1mdzr6q9hfJZl8JZRiwIfTjNyGcMD1 3r6qjKfBfP/s3NhwyzFwTRDR5IRiCmVHraI+R1HypzC8TEjWTakQszwWUN8HhR1j lFyaEMl/jQ+Ff4JN5W3PfYZjeHLDjSeuxeyA4sGDuJsin0QAU1qgAoV/QazybNnh is5K4Tz9cbyQhGR/6Ug56WwwcaK26xF6DnYFqR+K0XeiUeNxtcRSCnMRcU1GBKY=2djo -----END PGP SIGNATURE----- -------------- next part -------------- --- icecast-2.3.99.0.orig/configure.in 2012-07-18 01:25:56 +0400 +++ icecast-2.3.99.0/configure.in 2012-10-02 15:02:32 +0400 @@ -34,8 +34,9 @@ AC_HEADER_TIME AC_CHECK_HEADERS([alloca.h sys/timeb.h]) -AC_CHECK_HEADERS(pwd.h, AC_DEFINE(CHUID, 1, [Define if you have pwd.h]),,) -AC_CHECK_HEADERS(unistd.h, AC_DEFINE(CHROOT, 1, [Define if you have unistd.h]),,) +AC_CHECK_HEADERS([pwd.h, unistd.h, grp.h, sys/types.h]) +AC_CHECK_FUNC ([chuid]) +AC_CHECK_FUNC ([chown]) dnl Checks for typedefs, structures, and compiler characteristics. XIPH_C__FUNC__ --- icecast-2.3.99.0/src/main.c.orig 2012-10-02 14:52:40 +0400 +++ icecast-2.3.99.0/src/main.c 2012-10-02 15:02:04 +0400 @@ -41,9 +41,13 @@ #include "net/resolver.h" #include "httpp/httpp.h" -#ifdef CHUID +#if HAVE_SYS_TYPES_H #include <sys/types.h> +#endif +#if HAVE_GRP_H #include <grp.h> +#endif +#if HAVE_PWD_H #include <pwd.h> #endif @@ -362,7 +366,7 @@ } #endif -#ifdef CHROOT +#if HAVE_CHROOT if (conf->chroot) { if(getuid()) /* root check */ @@ -380,7 +384,7 @@ } #endif -#ifdef CHUID +#if HAVE_CHUID if(conf->chuid) { -------------- next part -------------- --- icecast-2.3.99.0/src/fserve.c.orig 2012-10-02 14:52:41 +0400 +++ icecast-2.3.99.0/src/fserve.c 2012-10-02 15:31:11 +0400 @@ -560,6 +560,7 @@ time_t now; int strflen; struct tm result; + struct tm *gmtime_result; off_t endpos = rangenumber+new_content_len-1; char *type; @@ -567,8 +568,18 @@ endpos = 0; } time(&now); +#if !defined(_WIN32) + gmtime_result = gmtime_r(&now, &result) +#else + /* gmtime() on W32 breaks POSIX and IS thread-safe (uses TLS) */ + gmtime_result = gmtime (&now); + if (gmtime_result) + memcpy (&result, gmtime_result, sizeof (result)); +#endif + if (gmtime_result == NULL) + goto fail; strflen = strftime(currenttime, 50, "%a, %d-%b-%Y %X GMT", - gmtime_r(&now, &result)); + &result); httpclient->respcode = 206; type = fserve_content_type (path); bytes = snprintf (httpclient->refbuf->data, BUFSIZE, --- icecast-2.3.99.0/src/logging.c.orig 2012-10-02 14:52:41 +0400 +++ icecast-2.3.99.0/src/logging.c 2012-10-02 15:30:57 +0400 @@ -54,7 +54,15 @@ struct tm *thetime; time_t now; - gmtime_r(&time1, &gmt); +#if !defined(_WIN32) + thetime = gmtime_r(&time1, &gmt) +#else + /* gmtime() on W32 breaks POSIX and IS thread-safe (uses TLS) */ + thetime = gmtime (&time1); + if (thetime) + memcpy (&gmt, thetime, sizeof (gmt)); +#endif + /* FIXME: bail out if gmtime* returns NULL */ time_days = t->tm_yday - gmt.tm_yday;
Hi, On 03/10/12 12:10, LRN wrote:> With these one can build 2.4-beta (AKA 2.3.99.0) with mingw32 (gcc-4.7.0).Hey, that's cool. Thanks a bunch!> Note, however, that win32 subdirectory is: > 1) Lacking a complete Makefile.am, so it can't be built with autotools. > 2) Depends on MFC, and MFC is not provided by any MinGW toolset (and > MS' MFC is, most likely, highly incompatible with MinGW). > > So you only get a console binary.Yeah, that matches my expectations. MinGW was my preferred option too, as I don't see myself setting up a VS6 with all dependencies for this. Loss of UI is unfortunate of course as there are many people who got used to it.> If someone has some free, maybe w32 GUI part of icecast could be > ported to GTK+? If that is too difficult, just allowing icecast to be > run as a service and be able to dump its statistics into a socket or > pipe should be enough - separate GUI can be hooked up to that.I think most of what the UI presents is available through the web interface (and XML if someone wants to use XSLT and process into a native UI). I guess providing a decent (nullsoft?) installer that inserts a service would be the way to go. We'd need to address some transition items. Provide e.g. a link to the config file. Document how to restart the service. Again thanks for your work. It's highly appreciated. Cheers Thomas
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 03.10.2012 15:14, R?cker Thomas wrote:>> If someone has some free, maybe w32 GUI part of icecast could be >> ported to GTK+? If that is too difficult, just allowing icecast >> to be run as a service and be able to dump its statistics into a >> socket or pipe should be enough - separate GUI can be hooked up >> to that. > > I think most of what the UI presents is available through the web > interface (and XML if someone wants to use XSLT and process into a > native UI).OK, that should be sufficient (everything and its dog has web interface these days...).> I guess providing a decent (nullsoft?) installer that inserts a > service would be the way to go.I meant W32 service utility code - it requires its own special kind of main function, and currently icecast uses some wicked preprocessor wizardry to compile main() as mainService() - which is obviously incompatible with current makefiles, and only works because MSVS-based buildsystem is completely separate. Service insertion/removal may be integrated into icecast itself (just as it's integrated into icecastService right now), or might be done by a separate app. Actually, i think there's a tool built right into W32 that does this...regsvr32 or something? What installer runs at installation time is up to the installer packages maintainer. Though IMO since users will have to configure icecast anyway (i.e. do config file editing), there's little value in automatically installing the service instead of just telling the user to run register_icecast_service.cmd and start_icecast_service.cmd after configuring it. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (MingW32) Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ iQEcBAEBAgAGBQJQbFYPAAoJEOs4Jb6SI2CwIF8H/jGRN1V8GJal5Xg+Qflw5zFc PfNWc6jVPIMzWu66XG6owkIGHUcDOJmGEKQtFmxPXly0daNhK54wNlhCtS7vMmzU YJb0e2YhGxSICQrbl6ZuWmQhb8pUhdGAs6cynGFLjuofPjesROpnJirBL/sqELb+ cV2Zf9KShMOcE7KZICouiTHgBiSKT6wvNdsZPY+QMEkMNW3SLeQ/u/sYt+JCG2Ts eiI0gHQZtPwaOskhQkpOmBj7pK/GBQFEZwKR/1fQIHj2p/vOl5hvyE1xE9EaYuA9 yFPbFbnpEDNrUShYy9SCbvI6gZX2eTR2q9+T5mnelpi/t4bAGxL7kl5Gs22krvI=3qSR -----END PGP SIGNATURE-----
reflum, On Wed, 2012-10-03 at 13:10 +0400, LRN wrote:> With these one can build 2.4-beta (AKA 2.3.99.0) with mingw32 (gcc-4.7.0). > > Note, however, that win32 subdirectory is: > 1) Lacking a complete Makefile.am, so it can't be built with autotools. > 2) Depends on MFC, and MFC is not provided by any MinGW toolset (and > MS' MFC is, most likely, highly incompatible with MinGW). > > So you only get a console binary. > > If someone has some free, maybe w32 GUI part of icecast could be > ported to GTK+? If that is too difficult, just allowing icecast to be > run as a service and be able to dump its statistics into a socket or > pipe should be enough - separate GUI can be hooked up to that.Thank you for your work. I just commited your patches after porting them to curren trunk (r18642). -- Philipp. (Rah of PH2) -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 482 bytes Desc: This is a digitally signed message part Url : http://lists.xiph.org/pipermail/icecast-dev/attachments/20121011/a3b89ad8/attachment.pgp