diff options
author | Anas Nashif <anas.nashif@intel.com> | 2013-08-13 07:48:01 -0400 |
---|---|---|
committer | Anas Nashif <anas.nashif@intel.com> | 2013-08-13 07:48:01 -0400 |
commit | 297c63fa65327491a2b50e521b661c5835a19fe4 (patch) | |
tree | cf30d58014e240eb5e4417727d8f137cdbe75828 /Source/kwsys/ProcessUNIX.c | |
parent | ef8aa19c33e83ff019595fd7f8fdc29c35c336a3 (diff) | |
download | cmake-297c63fa65327491a2b50e521b661c5835a19fe4.tar.gz cmake-297c63fa65327491a2b50e521b661c5835a19fe4.tar.bz2 cmake-297c63fa65327491a2b50e521b661c5835a19fe4.zip |
Imported Upstream version 2.8.11.2upstream/2.8.11.2sandbox/pcoval/previous/upstream
Diffstat (limited to 'Source/kwsys/ProcessUNIX.c')
-rw-r--r-- | Source/kwsys/ProcessUNIX.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/Source/kwsys/ProcessUNIX.c b/Source/kwsys/ProcessUNIX.c index 9c66a4486..b9af2f1f5 100644 --- a/Source/kwsys/ProcessUNIX.c +++ b/Source/kwsys/ProcessUNIX.c @@ -47,6 +47,12 @@ do. */ +#if defined(__CYGWIN__) +/* Increase the file descriptor limit for select() before including + related system headers. (Default: 64) */ +# define FD_SETSIZE 16384 +#endif + #include <stddef.h> /* ptrdiff_t */ #include <stdio.h> /* snprintf */ #include <stdlib.h> /* malloc, free */ @@ -63,10 +69,6 @@ do. #include <dirent.h> /* DIR, dirent */ #include <ctype.h> /* isspace */ -#ifdef __HAIKU__ -#undef __BEOS__ -#endif - #if defined(__VMS) # define KWSYSPE_VMS_NONBLOCK , O_NONBLOCK #else @@ -106,7 +108,7 @@ static inline void kwsysProcess_usleep(unsigned int msec) * pipes' file handles to be non-blocking and just poll them directly * without select(). */ -#if !defined(__BEOS__) && !defined(__VMS) +#if !defined(__BEOS__) && !defined(__VMS) && !defined(__MINT__) # define KWSYSPE_USE_SELECT 1 #endif @@ -422,9 +424,10 @@ int kwsysProcess_AddCommand(kwsysProcess* cp, char const* const* command) parse it. */ newCommands[cp->NumberOfCommands] = kwsysSystem_Parse_CommandForUnix(*command, 0); - if(!newCommands[cp->NumberOfCommands]) + if(!newCommands[cp->NumberOfCommands] || + !newCommands[cp->NumberOfCommands][0]) { - /* Out of memory. */ + /* Out of memory or no command parsed. */ free(newCommands); return 0; } @@ -2732,6 +2735,7 @@ static void kwsysProcessesSignalHandler(int signum kwsysProcess* cp = kwsysProcesses.Processes[i]; kwsysProcess_ssize_t status= read(cp->PipeReadEnds[KWSYSPE_PIPE_SIGNAL], &buf, 1); + (void)status; status=write(cp->SignalPipe, &buf, 1); (void)status; } |