From 8b73363c20980ca6cd1a2785e397828bac13a7a3 Mon Sep 17 00:00:00 2001 From: tg Date: Wed, 9 Feb 2011 19:32:26 +0000 Subject: [PATCH] =?UTF-8?q?query=20for=20select(2)=20in=20preparation=20of?= =?UTF-8?q?=20sleep=20and=20read-with-timeout=20builtins;=20ualarm(3)=20an?= =?UTF-8?q?d=20friends=20are=20too=20awkward=20to=20use=20so=20we=20ifdef?= =?UTF-8?q?=20these=20builtins=20on=20select=20support=20=E2=98=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Build.sh | 36 +++++++++++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/Build.sh b/Build.sh index 431613a..21a33a3 100644 --- a/Build.sh +++ b/Build.sh @@ -1,5 +1,5 @@ #!/bin/sh -srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.469 2011/01/30 02:18:19 tg Exp $' +srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.470 2011/02/09 19:32:26 tg Exp $' #- # Copyright (c) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 # Thorsten Glaser @@ -1074,18 +1074,22 @@ ac_ifcpp 'ifdef MKSH_CONSERVATIVE_FDS' isset_MKSH_CONSERVATIVE_FDS '' \ # # Environment: headers # -ac_header sys/param.h +ac_header sys/bsdtypes.h ac_header sys/file.h sys/types.h ac_header sys/mkdev.h sys/types.h ac_header sys/mman.h sys/types.h +ac_header sys/param.h +ac_header sys/select.h sys/types.h ac_header sys/sysmacros.h +ac_header bstring.h ac_header grp.h sys/types.h ac_header libgen.h ac_header libutil.h sys/types.h ac_header paths.h ac_header stdbool.h ac_header stdint.h stdarg.h -ac_header strings.h sys/types.h +# include strings.h only if compatible with string.h +ac_header strings.h sys/types.h string.h ac_header ulimit.h sys/types.h ac_header values.h @@ -1278,6 +1282,32 @@ ac_test langinfo_codeset setlocale_ctype 0 'nl_langinfo(CODESET)' <<-'EOF' int main(void) { return ((int)(ptrdiff_t)(void *)nl_langinfo(CODESET)); } EOF +ac_test select <<-'EOF' + #include + #include + #if HAVE_SYS_BSDTYPES_H + #include + #endif + #if HAVE_SYS_SELECT_H + #include + #endif + #if HAVE_BSTRING_H + #include + #endif + #include + #include + #include + #if HAVE_STRINGS_H + #include + #endif + #include + int main(void) { + struct timeval tv = { 1, 200000 }; + fd_set fds; FD_ZERO(&fds); FD_SET(0, &fds); + return (select(FD_SETSIZE, &fds, NULL, NULL, &tv)); + } +EOF + ac_test setresugid <<-'EOF' #include #include