1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 03:40:34 +02:00
guile/libguile/iselect.h
Neil Jerram 23ff1cff61 Fix Interix build hang
Jay Krell writes:

"Later on I get to:
gawk -f ./guile-func-name-check /src/guile-1.8.6/libguile/regex-posix.c
(./guile-snarf-docs -DHAVE_CONFIG_H -I.. -I/src/guile-1.8.6 -I.. -g -O2 -Wall -
Wmissing-prototypes -Werror /src/guile-1.8.6/libguile/regex-posix.c | \
./guile_filter_doc_snarfage --filter-snarfage) > regex-posix.doc || { rm
regex-posix.doc; false; }
cat alist.doc arbiters.doc async.doc backtrace.doc boolean.doc chars.doc
continuations.doc debug.doc deprecation.doc deprecated.doc discouraged.doc dynl.doc
dynwind.doc environments.doc eq.doc error.doc eval.doc evalext.doc extensions.doc
feature.doc fluids.doc fports.doc futures.doc gc.doc goops.doc gsubr.doc
gc-mark.doc gc-segment.doc gc-malloc.doc gc-card.doc guardians.doc hash.doc hashtab.doc
hooks.doc i18n.doc init.doc ioext.doc keywords.doc lang.doc list.doc load.doc
macros.doc mallocs.doc modules.doc numbers.doc objects.doc objprop.doc
options.doc pairs.doc ports.doc print.doc procprop.doc procs.doc properties.doc random.doc
rdelim.doc read.doc root.doc rw.doc scmsigs.doc script.doc simpos.doc smob.doc
sort.doc srcprop.doc stackchk.doc stacks.doc stime.doc strings.doc srfi-4.doc
srfi-13.doc srfi-14.doc strorder.doc strports.doc struct.doc symbols.doc
threads.doc throw.doc values.doc variable.doc vectors.doc version.doc vports.doc
weaks.doc ramap.doc unif.doc dynl.doc filesys.doc posix.doc net_db.doc
socket.doc
regex-posix.doc | GUILE="/dev/fs/C/obj/guile/pre-inst-guile" /src/guile-1.8.6/scripts/
snarf-check-and-output-texi > guile-procedures.texi || { rm guile-procedures.texi; false; }
ERROR: In procedure fport_input_waiting:
ERROR: Invalid argument

and it hangs.

[...and then later...]

Here is a very strange but successul fix for the hang. Now guile 1.8.6 builds
all the way through for me."

* libguile/iselect.h: On Interix, restrict SELECT_SET_SIZE to 1024.
2010-03-26 01:05:52 +00:00

72 lines
1.9 KiB
C
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/* classes: h_files */
#ifndef SCM_ISELECT_H
#define SCM_ISELECT_H
/* Copyright (C) 1997,1998,2000,2001, 2002, 2006 Free Software Foundation, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "libguile/__scm.h"
/* Needed for FD_SET on some systems. */
#include <sys/types.h>
#if SCM_HAVE_SYS_SELECT_H
# include <sys/select.h>
#endif
#if SCM_HAVE_WINSOCK2_H
# include <winsock2.h>
#endif
#ifdef FD_SET
#define SELECT_TYPE fd_set
#if defined(__INTERIX) && FD_SETSIZE == 4096
/* Interix defines FD_SETSIZE 4096 but select rejects that. */
#define SELECT_SET_SIZE 1024
#else
#define SELECT_SET_SIZE FD_SETSIZE
#endif
#else /* no FD_SET */
/* Define the macros to access a single-int bitmap of descriptors. */
#define SELECT_SET_SIZE 32
#define SELECT_TYPE int
#define FD_SET(n, p) (*(p) |= (1 << (n)))
#define FD_CLR(n, p) (*(p) &= ~(1 << (n)))
#define FD_ISSET(n, p) (*(p) & (1 << (n)))
#define FD_ZERO(p) (*(p) = 0)
#endif /* no FD_SET */
SCM_API int scm_std_select (int fds,
SELECT_TYPE *rfds,
SELECT_TYPE *wfds,
SELECT_TYPE *efds,
struct timeval *timeout);
#endif /* SCM_ISELECT_H */
/*
Local Variables:
c-file-style: "gnu"
End:
*/