Update of /cvsroot/audacity/lib-src/libnyquist In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv26616/libnyquist
Added Files: hurd-nyquist.patch Log Message: Benjamin Drung's patch allowing libnyquist to build on HURD. --- NEW FILE: hurd-nyquist.patch --- ? .deps ? Makefile ? config.log ? config.status ? hurd.patch Index: nyquist/cmt/midifns.c =================================================================== RCS file: /cvsroot/audacity/lib-src/libnyquist/nyquist/cmt/midifns.c,v retrieving revision 1.1 diff -u -r1.1 midifns.c --- nyquist/cmt/midifns.c 29 Jan 2009 18:04:20 -0000 1.1 +++ nyquist/cmt/midifns.c 6 Dec 2009 01:48:20 -0000 @@ -22,6 +22,7 @@ *****************************************************************************/ #include "switches.h" +#include <sys/resource.h> #ifdef UNIX #include <sys/param.h> @@ -376,6 +377,7 @@ struct timeval unix_timeout; struct timeval *waitspec = NULL; fd_set readfds; + struct rlimit file_limit; FD_ZERO(&readfds); FD_SET(MI_CONNECTION(midiconn), &readfds); @@ -387,7 +389,8 @@ unix_timeout.tv_usec = (timeout - (unix_timeout.tv_sec * 1000)) * 1000; waitspec = &unix_timeout; } - select(NOFILE+1, &readfds, 0, 0, waitspec); + getrlimit(RLIMIT_NOFILE, &file_limit); + select(file_limit.rlim_max+1, &readfds, 0, 0, waitspec); return; } #else /* !UNIX_ITC */ @@ -424,6 +427,7 @@ { struct timeval unix_timeout; struct timeval *waitspec = NULL; + struct rlimit file_limit; if (timeout >= 0) { timeout -= gettime(); /* convert to millisecond delay */ @@ -431,7 +435,8 @@ /* remainder become microsecs: */ unix_timeout.tv_usec = (timeout - (unix_timeout.tv_sec * 1000)) * 1000; waitspec = &unix_timeout; - select(NOFILE+1, 0, 0, 0, waitspec); + getrlimit(RLIMIT_NOFILE, &file_limit); + select(file_limit.rlim_max+1, 0, 0, 0, waitspec); } else { int c = getc(stdin); ungetc(c, stdin); @@ -445,6 +450,7 @@ struct timeval unix_timeout; struct timeval *waitspec = NULL; int readfds = 1 << IOinputfd; + struct rlimit file_limit; if (timeout >= 0) { timeout -= gettime(); /* convert to millisecond delay */ @@ -453,7 +459,8 @@ unix_timeout.tv_usec = (timeout - (unix_timeout.tv_sec * 1000)) * 1000; waitspec = &unix_timeout; } - select(NOFILE+1, &readfds, 0, 0, waitspec); + getrlimit(RLIMIT_NOFILE, &file_limit); + select(file_limit.rlim_max+1, &readfds, 0, 0, waitspec); return; } #endif /* BUFFERED_SYNCHRONOUS_INPUT */ Index: nyquist/cmt/userio.c =================================================================== RCS file: /cvsroot/audacity/lib-src/libnyquist/nyquist/cmt/userio.c,v retrieving revision 1.1 diff -u -r1.1 userio.c --- nyquist/cmt/userio.c 29 Jan 2009 18:04:21 -0000 1.1 +++ nyquist/cmt/userio.c 6 Dec 2009 01:48:20 -0000 @@ -70,6 +70,7 @@ */ #include "switches.h" +#include <sys/resource.h> #include <stdio.h> #include <string.h> @@ -1205,6 +1206,7 @@ #endif /* !UNIX_MACH */ #endif char c; + struct rlimit file_limit; if (abort_flag == ABORT_LEVEL) return ABORT_CHAR; if (abort_flag == BREAK_LEVEL) return BREAK_CHAR; @@ -1233,7 +1235,8 @@ FD_ZERO(&readfds); FD_SET(IOinputfd, &readfds); gflush(); - select(NOFILE+1, &readfds, 0, 0, NULL); + getrlimit(RLIMIT_NOFILE, &file_limit); + select(file_limit.rlim_max+1, &readfds, 0, 0, NULL); #endif /* !UNIX_MACH */ #endif /* ifdef UNIX */ } ------------------------------------------------------------------------------ Join us December 9, 2009 for the Red Hat Virtual Experience, a free event focused on virtualization and cloud computing. Attend in-depth sessions from your desk. Your couch. Anywhere. http://p.sf.net/sfu/redhat-sfdev2dev _______________________________________________ Audacity-cvs mailing list Audacity-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/audacity-cvs