New bug in gpc-20010502?

Frank Heckenbach frank at
Thu May 3 00:42:47 CEST 2001

Prof Abimbola Olowofoyeku wrote:

> A new bug (or incompatibility) seems to have crept into the latest gpc
> snapshot. In rts.c, in the function _p_SelectHandle(), there are these 
> lines:
>   #ifndef HAVE_SELECT
>   (void) readfds;
>   (void) writefds;
>   (void) exceptfds;
>   if (n) return -1;
>   _p_SleepMicroSeconds (MicroSeconds);
> Well, each line, except the call to _p_SleepMicroSeconds() causes an 
> error when compiling gpc for Mingw. Basically, I have had to comment 
> out each troublesome line. I am not sure whether the problem is in that 
> code or in the 'configure' script for the RTS or whether it is a gremlin 
> in my system.

My fault. I forgot to check this case when I moved some things
around in a recent change. I'll fix this in my next patch.

As an immediate solution, you can change the beginning of the
function to:

GLOBAL (int _p_SelectHandle (int Count, InternalSelectType *Events, MicroSecondTimeType MicroSeconds))
  int i;
  #ifndef HAVE_SELECT
  for (i = 0; i < Count; i++)
    if (Events [i].Handle >= 0)
      return -1;
  _p_SleepMicroSeconds (MicroSeconds);
  return 0;
  int Result, n = 0, fn;
  fd_set readfds, writefds, exceptfds;


Frank Heckenbach, frank at,
GPC To-Do list, latest features, fixed bugs:

More information about the Gpc mailing list