fix build problems related to fdsets

svn: r7845
This commit is contained in:
Matthew Flatt 2007-11-27 16:15:45 +00:00
parent cbf636442b
commit 4fda437fe3

View File

@ -641,6 +641,9 @@ Scheme_Object * scheme_make_eof (void)
#ifdef USE_DYNAMIC_FDSET_SIZE #ifdef USE_DYNAMIC_FDSET_SIZE
static int dynamic_fd_size; static int dynamic_fd_size;
# define STORED_ACTUAL_FDSET_LIMIT
# define FDSET_LIMIT(fd) (*(int *)((char *)fd XFORM_OK_PLUS dynamic_fd_size))
#ifdef MZ_XFORM #ifdef MZ_XFORM
START_XFORM_SKIP; START_XFORM_SKIP;
#endif #endif
@ -770,12 +773,12 @@ void scheme_fdset(void *fd, int n)
((win_extended_fd_set *)fd)->added++; ((win_extended_fd_set *)fd)->added++;
#endif #endif
#if defined(FILES_HAVE_FDS) || defined(USE_SOCKETS_TCP) #if defined(FILES_HAVE_FDS) || defined(USE_SOCKETS_TCP)
# define STORED_ACTUAL_FDSET_LIMIT # ifdef STORED_ACTUAL_FDSET_LIMIT
# define FDSET_LIMIT(fd) (*(int *)((char *)fd XFORM_OK_PLUS dynamic_fd_size))
int mx; int mx;
mx = FDSET_LIMIT(fd); mx = FDSET_LIMIT(fd);
if (n > mx) if (n > mx)
FDSET_LIMIT(fd) = n; FDSET_LIMIT(fd) = n;
# endif
FD_SET(n, ((fd_set *)fd)); FD_SET(n, ((fd_set *)fd));
#endif #endif
} }