summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-05-13 16:13:31 +0000
committereban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-05-13 16:13:31 +0000
commit6d53b692ab91c8817736cdec78b388e6e4990806 (patch)
tree3a84f886c14e2a9a8fe65c664b4f4805e2cbc2d4
parent9da4f78db46764be6dae5e7e83ff48cbecb3fb23 (diff)
support mingw32.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@688 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog16
-rw-r--r--configure362
-rw-r--r--configure.in36
-rw-r--r--cygwin/GNUmakefile.in17
-rw-r--r--defines.h3
-rw-r--r--ext/Win32API/Win32API.c2
-rw-r--r--ext/Win32API/extconf.rb2
-rw-r--r--ext/curses/extconf.rb2
-rw-r--r--ext/extmk.rb.in10
-rw-r--r--ext/pty/extconf.rb2
-rw-r--r--ext/readline/extconf.rb2
-rw-r--r--ext/socket/extconf.rb4
-rw-r--r--ext/socket/sockport.h5
-rw-r--r--ext/tcltklib/extconf.rb12
-rw-r--r--ext/tcltklib/tcltklib.c4
-rw-r--r--file.c8
-rw-r--r--io.c2
-rw-r--r--lib/mkmf.rb6
-rw-r--r--missing/dir.h2
-rw-r--r--missing/flock.c2
-rw-r--r--missing/vsnprintf.c2
-rw-r--r--signal.c6
-rw-r--r--version.h4
-rw-r--r--win32/win32.c37
-rw-r--r--win32/win32.h7
25 files changed, 327 insertions, 228 deletions
diff --git a/ChangeLog b/ChangeLog
index 15c28a9e42..e7e16d4d07 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+Sun May 14 00:54:43 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
+
+ * configure.in, ...: suport mingw32.
+
+ * defines.h: ditto. undef EXTERN for tcl/tk on cygwin.
+
+ * ext/*/extconf.rb: replace PLATFORM with RUBY_PLATFORM.
+
+ * ext/socket/sockport.h: define IN_MULTICAST for missing IN_MULTICAST.
+
+ * ext/tcltklib/tcltklib.c: remove declaration of rb_argv0.
+
+ * file.c: should check S_IXGRP, S_ISGID, not NT.
+
+ * io.c: should check _IOBIN, O_BINARY, not PLATFORMs.
+
Fri May 12 17:33:44 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
* regex.c (re_compile_pattern): charset_not should not exclude
diff --git a/configure b/configure
index e2fdcd92fa..dacc2e3ed2 100644
--- a/configure
+++ b/configure
@@ -1281,7 +1281,7 @@ test -n "$AR" || AR="ar"
case "$target_os" in
- cygwin*)
+ cygwin*|mingw*)
# Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
set dummy ${ac_tool_prefix}nm; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
@@ -2023,13 +2023,22 @@ macos*) ;;
human*) ac_cv_func_getpgrp_void=yes;;
beos*) ;;
cygwin*) ;;
+mingw*) LIBS="-lwsock32 -lmsvcrt $LIBS"
+ ac_cv_header_a_out_h=no
+ ac_cv_header_pwd_h=no
+ ac_cv_header_utime_h=no
+ ac_cv_header_sys_ioctl_h=no
+ ac_cv_header_sys_param_h=no
+ ac_cv_header_sys_resource_h=no
+ ac_cv_header_sys_select_h=no
+ ac_cv_header_sys_times_h=no;;
os2_emx*) LIBS="-lm $LIBS"
ac_cv_lib_xpg4_setlocale=no
ac_cv_lib_dir_opendir=no;;
*) LIBS="-lm $LIBS";;
esac
echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
-echo "configure:2033: checking for crypt in -lcrypt" >&5
+echo "configure:2042: checking for crypt in -lcrypt" >&5
ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -2037,7 +2046,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lcrypt $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2041 "configure"
+#line 2050 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -2048,7 +2057,7 @@ int main() {
crypt()
; return 0; }
EOF
-if { (eval echo configure:2052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -2076,7 +2085,7 @@ else
fi
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:2080: checking for dlopen in -ldl" >&5
+echo "configure:2089: checking for dlopen in -ldl" >&5
ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -2084,7 +2093,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2088 "configure"
+#line 2097 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -2095,7 +2104,7 @@ int main() {
dlopen()
; return 0; }
EOF
-if { (eval echo configure:2099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -2123,7 +2132,7 @@ else
fi
# Dynamic linking for SunOS/Solaris and SYSV
echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
-echo "configure:2127: checking for shl_load in -ldld" >&5
+echo "configure:2136: checking for shl_load in -ldld" >&5
ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -2131,7 +2140,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldld $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2135 "configure"
+#line 2144 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -2142,7 +2151,7 @@ int main() {
shl_load()
; return 0; }
EOF
-if { (eval echo configure:2146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -2170,7 +2179,7 @@ else
fi
# Dynamic linking for HP-UX
echo $ac_n "checking for setlocale in -lxpg4""... $ac_c" 1>&6
-echo "configure:2174: checking for setlocale in -lxpg4" >&5
+echo "configure:2183: checking for setlocale in -lxpg4" >&5
ac_lib_var=`echo xpg4'_'setlocale | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -2178,7 +2187,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lxpg4 $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2182 "configure"
+#line 2191 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -2189,7 +2198,7 @@ int main() {
setlocale()
; return 0; }
EOF
-if { (eval echo configure:2193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -2222,12 +2231,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
-echo "configure:2226: checking for $ac_hdr that defines DIR" >&5
+echo "configure:2235: checking for $ac_hdr that defines DIR" >&5
if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2231 "configure"
+#line 2240 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_hdr>
@@ -2235,7 +2244,7 @@ int main() {
DIR *dirp = 0;
; return 0; }
EOF
-if { (eval echo configure:2239: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2248: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_header_dirent_$ac_safe=yes"
else
@@ -2260,7 +2269,7 @@ done
# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
if test $ac_header_dirent = dirent.h; then
echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
-echo "configure:2264: checking for opendir in -ldir" >&5
+echo "configure:2273: checking for opendir in -ldir" >&5
ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -2268,7 +2277,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldir $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2272 "configure"
+#line 2281 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -2279,7 +2288,7 @@ int main() {
opendir()
; return 0; }
EOF
-if { (eval echo configure:2283: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -2301,7 +2310,7 @@ fi
else
echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
-echo "configure:2305: checking for opendir in -lx" >&5
+echo "configure:2314: checking for opendir in -lx" >&5
ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -2309,7 +2318,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lx $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2313 "configure"
+#line 2322 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -2320,7 +2329,7 @@ int main() {
opendir()
; return 0; }
EOF
-if { (eval echo configure:2324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -2343,12 +2352,12 @@ fi
fi
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:2347: checking for ANSI C header files" >&5
+echo "configure:2356: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2352 "configure"
+#line 2361 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -2356,7 +2365,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2360: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2369: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2373,7 +2382,7 @@ rm -f conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 2377 "configure"
+#line 2386 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@@ -2391,7 +2400,7 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 2395 "configure"
+#line 2404 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -2412,7 +2421,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
-#line 2416 "configure"
+#line 2425 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -2423,7 +2432,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
-if { (eval echo configure:2427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
@@ -2447,12 +2456,12 @@ EOF
fi
echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
-echo "configure:2451: checking for sys/wait.h that is POSIX.1 compatible" >&5
+echo "configure:2460: checking for sys/wait.h that is POSIX.1 compatible" >&5
if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2456 "configure"
+#line 2465 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/wait.h>
@@ -2468,7 +2477,7 @@ wait (&s);
s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
; return 0; }
EOF
-if { (eval echo configure:2472: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2481: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_sys_wait_h=yes
else
@@ -2494,17 +2503,17 @@ for ac_hdr in stdlib.h string.h unistd.h limits.h sys/file.h sys/ioctl.h\
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2498: checking for $ac_hdr" >&5
+echo "configure:2507: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2503 "configure"
+#line 2512 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2508: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2517: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2532,12 +2541,12 @@ done
echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
-echo "configure:2536: checking for uid_t in sys/types.h" >&5
+echo "configure:2545: checking for uid_t in sys/types.h" >&5
if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2541 "configure"
+#line 2550 "configure"
#include "confdefs.h"
#include <sys/types.h>
EOF
@@ -2566,12 +2575,12 @@ EOF
fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:2570: checking for size_t" >&5
+echo "configure:2579: checking for size_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2575 "configure"
+#line 2584 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -2599,12 +2608,12 @@ EOF
fi
echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
-echo "configure:2603: checking for st_blksize in struct stat" >&5
+echo "configure:2612: checking for st_blksize in struct stat" >&5
if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2608 "configure"
+#line 2617 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
@@ -2612,7 +2621,7 @@ int main() {
struct stat s; s.st_blksize;
; return 0; }
EOF
-if { (eval echo configure:2616: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2625: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_st_blksize=yes
else
@@ -2634,12 +2643,12 @@ fi
save_LIBOJBS="$LIBOBJS"
echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
-echo "configure:2638: checking for st_blocks in struct stat" >&5
+echo "configure:2647: checking for st_blocks in struct stat" >&5
if eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2643 "configure"
+#line 2652 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
@@ -2647,7 +2656,7 @@ int main() {
struct stat s; s.st_blocks;
; return 0; }
EOF
-if { (eval echo configure:2651: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2660: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_st_blocks=yes
else
@@ -2671,12 +2680,12 @@ fi
LIBOBJS="$save_LIBOBJS"
echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
-echo "configure:2675: checking for st_rdev in struct stat" >&5
+echo "configure:2684: checking for st_rdev in struct stat" >&5
if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2680 "configure"
+#line 2689 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
@@ -2684,7 +2693,7 @@ int main() {
struct stat s; s.st_rdev;
; return 0; }
EOF
-if { (eval echo configure:2688: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2697: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_st_rdev=yes
else
@@ -2706,7 +2715,7 @@ fi
echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
-echo "configure:2710: checking type of array argument to getgroups" >&5
+echo "configure:2719: checking type of array argument to getgroups" >&5
if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2714,7 +2723,7 @@ else
ac_cv_type_getgroups=cross
else
cat > conftest.$ac_ext <<EOF
-#line 2718 "configure"
+#line 2727 "configure"
#include "confdefs.h"
/* Thanks to Mike Rendell for this test. */
@@ -2739,7 +2748,7 @@ main()
}
EOF
-if { (eval echo configure:2743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_type_getgroups=gid_t
else
@@ -2753,7 +2762,7 @@ fi
if test $ac_cv_type_getgroups = cross; then
cat > conftest.$ac_ext <<EOF
-#line 2757 "configure"
+#line 2766 "configure"
#include "confdefs.h"
#include <unistd.h>
EOF
@@ -2777,12 +2786,12 @@ EOF
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:2781: checking return type of signal handlers" >&5
+echo "configure:2790: checking return type of signal handlers" >&5
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2786 "configure"
+#line 2795 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
@@ -2799,7 +2808,7 @@ int main() {
int i;
; return 0; }
EOF
-if { (eval echo configure:2803: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2812: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_type_signal=void
else
@@ -2820,19 +2829,19 @@ EOF
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:2824: checking for working alloca.h" >&5
+echo "configure:2833: checking for working alloca.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2829 "configure"
+#line 2838 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
-void *p = alloca(2 * sizeof(int));
+char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:2836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_header_alloca_h=yes
else
@@ -2853,12 +2862,12 @@ EOF
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:2857: checking for alloca" >&5
+echo "configure:2866: checking for alloca" >&5
if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2862 "configure"
+#line 2871 "configure"
#include "confdefs.h"
#ifdef __GNUC__
@@ -2886,7 +2895,7 @@ int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:2890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_func_alloca_works=yes
else
@@ -2918,12 +2927,12 @@ EOF
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:2922: checking whether alloca needs Cray hooks" >&5
+echo "configure:2931: checking whether alloca needs Cray hooks" >&5
if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2927 "configure"
+#line 2936 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@@ -2948,12 +2957,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&6
if test $ac_cv_os_cray = yes; then
for ac_func in _getb67 GETB67 getb67; do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2952: checking for $ac_func" >&5
+echo "configure:2961: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2957 "configure"
+#line 2966 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2976,7 +2985,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3003,7 +3012,7 @@ done
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:3007: checking stack direction for C alloca" >&5
+echo "configure:3016: checking stack direction for C alloca" >&5
if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3011,7 +3020,7 @@ else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 3015 "configure"
+#line 3024 "configure"
#include "confdefs.h"
find_stack_direction ()
{
@@ -3030,7 +3039,7 @@ main ()
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:3034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_stack_direction=1
else
@@ -3052,12 +3061,12 @@ EOF
fi
echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:3056: checking for pid_t" >&5
+echo "configure:3065: checking for pid_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3061 "configure"
+#line 3070 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -3086,17 +3095,17 @@ fi
ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
-echo "configure:3090: checking for vfork.h" >&5
+echo "configure:3099: checking for vfork.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3095 "configure"
+#line 3104 "configure"
#include "confdefs.h"
#include <vfork.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3100: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3109: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -3121,18 +3130,18 @@ else
fi
echo $ac_n "checking for working vfork""... $ac_c" 1>&6
-echo "configure:3125: checking for working vfork" >&5
+echo "configure:3134: checking for working vfork" >&5
if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
echo $ac_n "checking for vfork""... $ac_c" 1>&6
-echo "configure:3131: checking for vfork" >&5
+echo "configure:3140: checking for vfork" >&5
if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3136 "configure"
+#line 3145 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char vfork(); below. */
@@ -3155,7 +3164,7 @@ vfork();
; return 0; }
EOF
-if { (eval echo configure:3159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_vfork=yes"
else
@@ -3177,7 +3186,7 @@ fi
ac_cv_func_vfork_works=$ac_cv_func_vfork
else
cat > conftest.$ac_ext <<EOF
-#line 3181 "configure"
+#line 3190 "configure"
#include "confdefs.h"
/* Thanks to Paul Eggert for this test. */
#include <stdio.h>
@@ -3272,7 +3281,7 @@ main() {
}
}
EOF
-if { (eval echo configure:3276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_vfork_works=yes
else
@@ -3295,7 +3304,7 @@ EOF
fi
echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
-echo "configure:3299: checking for 8-bit clean memcmp" >&5
+echo "configure:3308: checking for 8-bit clean memcmp" >&5
if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3303,7 +3312,7 @@ else
ac_cv_func_memcmp_clean=no
else
cat > conftest.$ac_ext <<EOF
-#line 3307 "configure"
+#line 3316 "configure"
#include "confdefs.h"
main()
@@ -3313,7 +3322,7 @@ main()
}
EOF
-if { (eval echo configure:3317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_memcmp_clean=yes
else
@@ -3335,12 +3344,12 @@ for ac_func in dup2 memmove mkdir strcasecmp strncasecmp strerror strftime\
isinf isnan finite
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3339: checking for $ac_func" >&5
+echo "configure:3348: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3344 "configure"
+#line 3353 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3363,7 +3372,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3396,12 +3405,12 @@ for ac_func in fmod killpg drand48 random wait4 waitpid syscall getcwd\
dlopen sigprocmask sigaction _setjmp setsid getrlimit
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3400: checking for $ac_func" >&5
+echo "configure:3409: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3405 "configure"
+#line 3414 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3424,7 +3433,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3449,12 +3458,12 @@ fi
done
echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
-echo "configure:3453: checking whether struct tm is in sys/time.h or time.h" >&5
+echo "configure:3462: checking whether struct tm is in sys/time.h or time.h" >&5
if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3458 "configure"
+#line 3467 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <time.h>
@@ -3462,7 +3471,7 @@ int main() {
struct tm *tp; tp->tm_sec;
; return 0; }
EOF
-if { (eval echo configure:3466: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3475: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_tm=time.h
else
@@ -3483,12 +3492,12 @@ EOF
fi
echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
-echo "configure:3487: checking for tm_zone in struct tm" >&5
+echo "configure:3496: checking for tm_zone in struct tm" >&5
if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3492 "configure"
+#line 3501 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_cv_struct_tm>
@@ -3496,7 +3505,7 @@ int main() {
struct tm tm; tm.tm_zone;
; return 0; }
EOF
-if { (eval echo configure:3500: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3509: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_tm_zone=yes
else
@@ -3516,12 +3525,12 @@ EOF
else
echo $ac_n "checking for tzname""... $ac_c" 1>&6
-echo "configure:3520: checking for tzname" >&5
+echo "configure:3529: checking for tzname" >&5
if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3525 "configure"
+#line 3534 "configure"
#include "confdefs.h"
#include <time.h>
#ifndef tzname /* For SGI. */
@@ -3531,7 +3540,7 @@ int main() {
atoi(*tzname);
; return 0; }
EOF
-if { (eval echo configure:3535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_var_tzname=yes
else
@@ -3554,14 +3563,14 @@ fi
if test "$ac_cv_func_strftime" = no; then
cat > conftest.$ac_ext <<EOF
-#line 3558 "configure"
+#line 3567 "configure"
#include "confdefs.h"
int main() {
extern int daylight; int i = daylight;
; return 0; }
EOF
-if { (eval echo configure:3565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
cat >> confdefs.h <<\EOF
#define HAVE_DAYLIGHT 1
@@ -3581,7 +3590,7 @@ EOF
else
echo $ac_n "checking for BSD signal semantics""... $ac_c" 1>&6
-echo "configure:3585: checking for BSD signal semantics" >&5
+echo "configure:3594: checking for BSD signal semantics" >&5
if eval "test \"`echo '$''{'rb_cv_bsd_signal'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3589,7 +3598,7 @@ else
rb_cv_bsd_signal=no
else
cat > conftest.$ac_ext <<EOF
-#line 3593 "configure"
+#line 3602 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -3611,7 +3620,7 @@ main()
}
EOF
-if { (eval echo configure:3615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
rb_cv_bsd_signal=yes
else
@@ -3635,7 +3644,7 @@ EOF
fi
echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
-echo "configure:3639: checking whether getpgrp takes no argument" >&5
+echo "configure:3648: checking whether getpgrp takes no argument" >&5
if eval "test \"`echo '$''{'ac_cv_func_getpgrp_void'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3643,7 +3652,7 @@ else
{ echo "configure: error: cannot check getpgrp if cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 3647 "configure"
+#line 3656 "configure"
#include "confdefs.h"
/*
@@ -3698,7 +3707,7 @@ main()
}
EOF
-if { (eval echo configure:3702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_getpgrp_void=yes
else
@@ -3722,7 +3731,7 @@ EOF
fi
echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
-echo "configure:3726: checking whether setpgrp takes no argument" >&5
+echo "configure:3735: checking whether setpgrp takes no argument" >&5
if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3730,7 +3739,7 @@ else
{ echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 3734 "configure"
+#line 3743 "configure"
#include "confdefs.h"
#ifdef HAVE_UNISTD_H
@@ -3750,7 +3759,7 @@ main()
}
EOF
-if { (eval echo configure:3754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_setpgrp_void=no
else
@@ -3775,7 +3784,7 @@ fi
echo $ac_n "checking for working strtod""... $ac_c" 1>&6
-echo "configure:3779: checking for working strtod" >&5
+echo "configure:3788: checking for working strtod" >&5
if eval "test \"`echo '$''{'rb_cv_func_strtod'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3783,7 +3792,7 @@ else
rb_cv_func_strtod=no
else
cat > conftest.$ac_ext <<EOF
-#line 3787 "configure"
+#line 3796 "configure"
#include "confdefs.h"
double strtod ();
@@ -3813,7 +3822,7 @@ main()
}
EOF
-if { (eval echo configure:3817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
rb_cv_func_strtod=yes
else
@@ -3831,14 +3840,14 @@ echo "$ac_t""$rb_cv_func_strtod" 1>&6
test $rb_cv_func_strtod = no && LIBOBJS="$LIBOBJS strtod.o"
echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
-echo "configure:3835: checking whether byte ordering is bigendian" >&5
+echo "configure:3844: checking whether byte ordering is bigendian" >&5
if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_bigendian=unknown
# See if sys/param.h defines the BYTE_ORDER macro.
cat > conftest.$ac_ext <<EOF
-#line 3842 "configure"
+#line 3851 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
@@ -3849,11 +3858,11 @@ int main() {
#endif
; return 0; }
EOF
-if { (eval echo configure:3853: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3862: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
# It does; now see whether it defined to BIG_ENDIAN or not.
cat > conftest.$ac_ext <<EOF
-#line 3857 "configure"
+#line 3866 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
@@ -3864,7 +3873,7 @@ int main() {
#endif
; return 0; }
EOF
-if { (eval echo configure:3868: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3877: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_bigendian=yes
else
@@ -3884,7 +3893,7 @@ if test "$cross_compiling" = yes; then
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 3888 "configure"
+#line 3897 "configure"
#include "confdefs.h"
main () {
/* Are we little or big endian? From Harbison&Steele. */
@@ -3897,7 +3906,7 @@ main () {
exit (u.c[sizeof (long) - 1] == 1);
}
EOF
-if { (eval echo configure:3901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_bigendian=no
else
@@ -3921,18 +3930,18 @@ EOF
fi
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:3925: checking for working const" >&5
+echo "configure:3934: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3930 "configure"
+#line 3939 "configure"
#include "confdefs.h"
int main() {
/* Ultrix mips cc rejects this. */
-typedef int charset[2]; const charset x = {0,0};
+typedef int charset[2]; const charset x;
/* SunOS 4.1.1 cc rejects this. */
char const *const *ccp;
char **p;
@@ -3975,7 +3984,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
-if { (eval echo configure:3979: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3988: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
@@ -3996,14 +4005,14 @@ EOF
fi
echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
-echo "configure:4000: checking whether char is unsigned" >&5
+echo "configure:4009: checking whether char is unsigned" >&5
if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$GCC" = yes; then
# GCC predefines this symbol on systems where it applies.
cat > conftest.$ac_ext <<EOF
-#line 4007 "configure"
+#line 4016 "configure"
#include "confdefs.h"
#ifdef __CHAR_UNSIGNED__
yes
@@ -4025,7 +4034,7 @@ if test "$cross_compiling" = yes; then
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 4029 "configure"
+#line 4038 "configure"
#include "confdefs.h"
/* volatile prevents gcc2 from optimizing the test away on sparcs. */
#if !defined(__STDC__) || __STDC__ != 1
@@ -4035,7 +4044,7 @@ main() {
volatile char c = 255; exit(c < 0);
}
EOF
-if { (eval echo configure:4039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_char_unsigned=yes
else
@@ -4060,7 +4069,7 @@ fi
echo $ac_n "checking whether right shift preserve sign bit""... $ac_c" 1>&6
-echo "configure:4064: checking whether right shift preserve sign bit" >&5
+echo "configure:4073: checking whether right shift preserve sign bit" >&5
if eval "test \"`echo '$''{'rb_cv_rshift_sign'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4068,7 +4077,7 @@ else
rb_cv_rshift_sign=yes
else
cat > conftest.$ac_ext <<EOF
-#line 4072 "configure"
+#line 4081 "configure"
#include "confdefs.h"
int
@@ -4080,7 +4089,7 @@ main()
}
EOF
-if { (eval echo configure:4084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
rb_cv_rshift_sign=yes
else
@@ -4108,19 +4117,19 @@ EOF
fi
echo $ac_n "checking count field in FILE structures""... $ac_c" 1>&6
-echo "configure:4112: checking count field in FILE structures" >&5
+echo "configure:4121: checking count field in FILE structures" >&5
if eval "test \"`echo '$''{'rb_cv_fcnt'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4117 "configure"
+#line 4126 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() {
FILE *f = stdin; f->_cnt = 0;
; return 0; }
EOF
-if { (eval echo configure:4124: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4133: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
rb_cv_fcnt="_cnt"
else
@@ -4130,14 +4139,14 @@ fi
rm -f conftest*
if test "$rb_cv_fcnt" = ""; then
cat > conftest.$ac_ext <<EOF
-#line 4134 "configure"
+#line 4143 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() {
FILE *f = stdin; f->__cnt = 0;
; return 0; }
EOF
-if { (eval echo configure:4141: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4150: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
rb_cv_fcnt="__cnt"
else
@@ -4148,14 +4157,14 @@ rm -f conftest*
fi
if test "$rb_cv_fcnt" = ""; then
cat > conftest.$ac_ext <<EOF
-#line 4152 "configure"
+#line 4161 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() {
FILE *f = stdin; f->_r = 0;
; return 0; }
EOF
-if { (eval echo configure:4159: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4168: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
rb_cv_fcnt="_r"
else
@@ -4166,14 +4175,14 @@ rm -f conftest*
fi
if test "$rb_cv_fcnt" = ""; then
cat > conftest.$ac_ext <<EOF
-#line 4170 "configure"
+#line 4179 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() {
FILE *f = stdin; f->readCount = 0;
; return 0; }
EOF
-if { (eval echo configure:4177: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4186: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
rb_cv_fcnt="readCount"
else
@@ -4184,14 +4193,14 @@ rm -f conftest*
fi
if test "$rb_cv_fcnt" = ""; then
cat > conftest.$ac_ext <<EOF
-#line 4188 "configure"
+#line 4197 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() {
FILE *f = stdin; f->_rcount = 0;
; return 0; }
EOF
-if { (eval echo configure:4195: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4204: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
rb_cv_fcnt="_rcount"
else
@@ -4248,7 +4257,7 @@ fi
echo $ac_n "checking whether ELF binaries are produced""... $ac_c" 1>&6
-echo "configure:4252: checking whether ELF binaries are produced" >&5
+echo "configure:4261: checking whether ELF binaries are produced" >&5
if eval "test \"`echo '$''{'rb_cv_binary_elf'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4256,7 +4265,7 @@ else
rb_cv_binary_elf=yes
else
cat > conftest.$ac_ext <<EOF
-#line 4260 "configure"
+#line 4269 "configure"
#include "confdefs.h"
/* Test for whether ELF binaries are produced */
@@ -4276,7 +4285,7 @@ main() {
}
EOF
-if { (eval echo configure:4280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
rb_cv_binary_elf=yes
else
@@ -4324,7 +4333,7 @@ STATIC=
if test "$with_dln_a_out" != yes; then
rb_cv_dlopen=unknown
echo $ac_n "checking whether OS depend dynamic link works""... $ac_c" 1>&6
-echo "configure:4328: checking whether OS depend dynamic link works" >&5
+echo "configure:4337: checking whether OS depend dynamic link works" >&5
if test "$GCC" = yes; then
case "$target_os" in
nextstep*) ;;
@@ -4334,6 +4343,7 @@ echo "configure:4328: checking whether OS depend dynamic link works" >&5
human*) ;;
bsdi*) ;;
cygwin*) ;;
+ mingw*) ;;
netbsd*) CCDLFLAGS=-fpic
case "$target_cpu" in
mips*) CCDLFLAGS=-fPIC ;;
@@ -4436,7 +4446,7 @@ echo "configure:4328: checking whether OS depend dynamic link works" >&5
DLDFLAGS="ruby.def -lbe -lroot glue-noinit.a init_term_dyn.o start_dyn.o"
esac
rb_cv_dlopen=yes ;;
- cygwin*) : ${LDSHARED="${DLLWRAP} --as=${AS} --dlltool-name=${DLLTOOL} --driver-name=${CC} --export-all -s"}
+ cygwin*|mingw*) : ${LDSHARED="${DLLWRAP} --target=${target_os} --as=${AS} --dlltool-name=${DLLTOOL} --driver-name=${CC} --export-all -s"}
rb_cv_dlopen=yes ;;
*) LDSHARED='ld' ;;
esac
@@ -4448,12 +4458,12 @@ if test "$ac_cv_header_a_out_h" = yes; then
if test "$with_dln_a_out" = yes || test "$rb_cv_dlopen" = unknown; then
cat confdefs.h > config.h
echo $ac_n "checking whether matz's dln works""... $ac_c" 1>&6
-echo "configure:4452: checking whether matz's dln works" >&5
+echo "configure:4462: checking whether matz's dln works" >&5
if eval "test \"`echo '$''{'rb_cv_dln_a_out'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4457 "configure"
+#line 4467 "configure"
#include "confdefs.h"
#define USE_DLN_A_OUT
@@ -4463,7 +4473,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:4467: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4477: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
rb_cv_dln_a_out=yes
else
@@ -4530,7 +4540,7 @@ EOF
#define DLEXT ".dll"
EOF
;;
- cygwin*) DLEXT=so
+ cygwin*|mingw*) DLEXT=so
cat >> confdefs.h <<\EOF
#define DLEXT ".so"
EOF
@@ -4582,7 +4592,7 @@ fi
case "$target_os" in
human*)
echo $ac_n "checking for _harderr in -lsignal""... $ac_c" 1>&6
-echo "configure:4586: checking for _harderr in -lsignal" >&5
+echo "configure:4596: checking for _harderr in -lsignal" >&5
ac_lib_var=`echo signal'_'_harderr | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4590,7 +4600,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lsignal $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4594 "configure"
+#line 4604 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -4601,7 +4611,7 @@ int main() {
_harderr()
; return 0; }
EOF
-if { (eval echo configure:4605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -4629,7 +4639,7 @@ else
fi
echo $ac_n "checking for hmemset in -lhmem""... $ac_c" 1>&6
-echo "configure:4633: checking for hmemset in -lhmem" >&5
+echo "configure:4643: checking for hmemset in -lhmem" >&5
ac_lib_var=`echo hmem'_'hmemset | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4637,7 +4647,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lhmem $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4641 "configure"
+#line 4651 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -4648,7 +4658,7 @@ int main() {
hmemset()
; return 0; }
EOF
-if { (eval echo configure:4652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -4678,12 +4688,12 @@ fi
for ac_func in select gettimeofday
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4682: checking for $ac_func" >&5
+echo "configure:4692: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4687 "configure"
+#line 4697 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -4706,7 +4716,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:4710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -4731,7 +4741,7 @@ fi
done
echo $ac_n "checking whether PD libc _dtos18 fail to convert big number""... $ac_c" 1>&6
-echo "configure:4735: checking whether PD libc _dtos18 fail to convert big number" >&5
+echo "configure:4745: checking whether PD libc _dtos18 fail to convert big number" >&5
if eval "test \"`echo '$''{'rb_cv_missing__dtos18'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4739,7 +4749,7 @@ else
rb_cv_missing__dtos18=no
else
cat > conftest.$ac_ext <<EOF
-#line 4743 "configure"
+#line 4753 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4751,7 +4761,7 @@ main ()
}
EOF
-if { (eval echo configure:4755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
rb_cv_missing__dtos18=yes
else
@@ -4773,7 +4783,7 @@ EOF
fi
echo $ac_n "checking whether PD libc fconvert fail to round""... $ac_c" 1>&6
-echo "configure:4777: checking whether PD libc fconvert fail to round" >&5
+echo "configure:4787: checking whether PD libc fconvert fail to round" >&5
if eval "test \"`echo '$''{'rb_cv_missing_fconvert'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4781,7 +4791,7 @@ else
rb_cv_missing_fconvert=no
else
cat > conftest.$ac_ext <<EOF
-#line 4785 "configure"
+#line 4795 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4794,7 +4804,7 @@ main ()
}
EOF
-if { (eval echo configure:4798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
rb_cv_missing_fconvert=yes
else
@@ -4825,9 +4835,6 @@ EOF
LIBOBJS="$LIBOBJS os2.$OBJEXT"
setup=Setup.emx
;;
- cygwin*)
- setup=Setup
- ;;
*)
setup=Setup
;;
@@ -4879,7 +4886,7 @@ if test "$target_os" = "beos"; then
fi
case "$target_os" in
- cygwin*|beos*|openstep*|nextstep*|rhapsody*|macos*|os2_emx*)
+ cygwin*|mingw*|beos*|openstep*|nextstep*|rhapsody*|macos*|os2_emx*)
DLDLIBS=""
;;
*)
@@ -4943,15 +4950,24 @@ if test "$enable_shared" = 'yes'; then
LIBRUBYARG='-L${prefix}/lib -Wl,lib$(RUBY_INSTALL_NAME).so'
SOLIBS='-lm -lc'
;;
- cygwin*)
+ cygwin*|mingw*)
LIBRUBY_SO='lib$(RUBY_INSTALL_NAME).a'
LIBRUBY_ALIASES=''
LIBRUBY_A='lib$(RUBY_INSTALL_NAME)s.a'
LIBRUBYARG='-L. -l$(RUBY_INSTALL_NAME)'
FIRSTMAKEFILE=GNUmakefile:cygwin/GNUmakefile.in
- LIBOBJS="$LIBOBJS strftime.o"
- CCDLFLAGS=-DUSEIMPORTLIB
+ case "$target_os" in
+ cygwin*)
+ LIBOBJS="$LIBOBJS strftime.o"
+ CCDLFLAGS=-DUSEIMPORTLIB
+ ;;
+ mingw*)
+ LIBOBJS="$LIBOBJS win32.o"
+ CFLAGS="-DNT -D__MSVCRT__ $CFLAGS"
+ CCDLFLAGS=-DIMPORT
;;
+ esac
+ ;;
*)
;;
esac
diff --git a/configure.in b/configure.in
index 22e1e68dce..1a33cc0026 100644
--- a/configure.in
+++ b/configure.in
@@ -87,7 +87,7 @@ AC_CHECK_TOOL(AR, ar)
AC_CHECK_PROGS(AR, ar aal, ar)
case "$target_os" in
- cygwin*)
+ cygwin*|mingw*)
AC_CHECK_TOOL(NM, nm)
AC_CHECK_TOOL(DLLWRAP, dllwrap)
AC_CHECK_TOOL(AS, as)
@@ -165,6 +165,15 @@ macos*) ;;
human*) ac_cv_func_getpgrp_void=yes;;
beos*) ;;
cygwin*) ;;
+mingw*) LIBS="-lwsock32 -lmsvcrt $LIBS"
+ ac_cv_header_a_out_h=no
+ ac_cv_header_pwd_h=no
+ ac_cv_header_utime_h=no
+ ac_cv_header_sys_ioctl_h=no
+ ac_cv_header_sys_param_h=no
+ ac_cv_header_sys_resource_h=no
+ ac_cv_header_sys_select_h=no
+ ac_cv_header_sys_times_h=no;;
os2_emx*) LIBS="-lm $LIBS"
ac_cv_lib_xpg4_setlocale=no
ac_cv_lib_dir_opendir=no;;
@@ -419,6 +428,7 @@ if test "$with_dln_a_out" != yes; then
human*) ;;
bsdi*) ;;
cygwin*) ;;
+ mingw*) ;;
netbsd*) CCDLFLAGS=-fpic
case "$target_cpu" in
mips*) CCDLFLAGS=-fPIC ;;
@@ -521,7 +531,7 @@ if test "$with_dln_a_out" != yes; then
DLDFLAGS="ruby.def -lbe -lroot glue-noinit.a init_term_dyn.o start_dyn.o"
esac
rb_cv_dlopen=yes ;;
- cygwin*) : ${LDSHARED="${DLLWRAP} --as=${AS} --dlltool-name=${DLLTOOL} --driver-name=${CC} --export-all -s"}
+ cygwin*|mingw*) : ${LDSHARED="${DLLWRAP} --target=${target_os} --as=${AS} --dlltool-name=${DLLTOOL} --driver-name=${CC} --export-all -s"}
rb_cv_dlopen=yes ;;
*) LDSHARED='ld' ;;
esac
@@ -570,7 +580,7 @@ else
AC_DEFINE(DLEXT, ".bundle");;
os2_emx*) DLEXT=dll
AC_DEFINE(DLEXT, ".dll");;
- cygwin*) DLEXT=so
+ cygwin*|mingw*) DLEXT=so
AC_DEFINE(DLEXT, ".so")
DLEXT2=dll
AC_DEFINE(DLEXT2, ".dll");;
@@ -662,9 +672,6 @@ rb_cv_missing_fconvert=yes, rb_cv_missing_fconvert=no, rb_cv_missing_fconvert=no
LIBOBJS="$LIBOBJS os2.$OBJEXT"
setup=Setup.emx
;;
- cygwin*)
- setup=Setup
- ;;
*)
setup=Setup
;;
@@ -716,7 +723,7 @@ if test "$target_os" = "beos"; then
fi
case "$target_os" in
- cygwin*|beos*|openstep*|nextstep*|rhapsody*|macos*|os2_emx*)
+ cygwin*|mingw*|beos*|openstep*|nextstep*|rhapsody*|macos*|os2_emx*)
DLDLIBS=""
;;
*)
@@ -777,15 +784,24 @@ if test "$enable_shared" = 'yes'; then
LIBRUBYARG='-L${prefix}/lib -Wl,lib$(RUBY_INSTALL_NAME).so'
SOLIBS='-lm -lc'
;;
- cygwin*)
+ cygwin*|mingw*)
LIBRUBY_SO='lib$(RUBY_INSTALL_NAME).a'
LIBRUBY_ALIASES=''
LIBRUBY_A='lib$(RUBY_INSTALL_NAME)s.a'
LIBRUBYARG='-L. -l$(RUBY_INSTALL_NAME)'
FIRSTMAKEFILE=GNUmakefile:cygwin/GNUmakefile.in
- LIBOBJS="$LIBOBJS strftime.o"
- CCDLFLAGS=-DUSEIMPORTLIB
+ case "$target_os" in
+ cygwin*)
+ LIBOBJS="$LIBOBJS strftime.o"
+ CCDLFLAGS=-DUSEIMPORTLIB
;;
+ mingw*)
+ LIBOBJS="$LIBOBJS win32.o"
+ CFLAGS="-DNT -D__MSVCRT__ $CFLAGS"
+ CCDLFLAGS=-DIMPORT
+ ;;
+ esac
+ ;;
*)
;;
esac
diff --git a/cygwin/GNUmakefile.in b/cygwin/GNUmakefile.in
index ca16e32e48..ba3a1d2664 100644
--- a/cygwin/GNUmakefile.in
+++ b/cygwin/GNUmakefile.in
@@ -1,8 +1,17 @@
include Makefile
-RUBYCWDLL=rubycw.dll
+ARCH=@arch@
-miniruby$(EXEEXT): $(RUBYCWDLL)
+ifneq (,$(findstring mingw, $(ARCH)))
+VPATH = @srcdir@/missing:@srcdir@/win32
+DLL = rubymg.dll
+DLLWRAP_FLAGS =
+else
+DLL = rubycw.dll
+DLLWRAP_FLAGS = -Wl,-e,__cygwin_noncygwin_dll_entry@12
+endif
-$(RUBYCWDLL): $(OBJS) dmyext.o
- $(LDSHARED) $(DLDFLAGS) -o $(RUBYCWDLL) --output-lib=$(LIBRUBY_SO) --dllname=$(RUBYCWDLL) -Wl,-e,__cygwin_noncygwin_dll_entry@12 --add-stdcall-alias $(OBJS) dmyext.o
+miniruby$(EXEEXT): $(DLL)
+
+$(DLL): $(OBJS) dmyext.o
+ $(LDSHARED) $(DLDFLAGS) -o $(DLL) --output-lib=$(LIBRUBY_SO) --dllname=$(DLL) --add-stdcall-alias $(OBJS) dmyext.o $(LIBS)
diff --git a/defines.h b/defines.h
index b5761d66ad..4f31f880d8 100644
--- a/defines.h
+++ b/defines.h
@@ -31,10 +31,13 @@
#endif /* NeXT */
#ifdef NT
+#define USHORT _USHORT
#include "win32/win32.h"
+#undef USHORT
#endif
#if defined __CYGWIN__
+# undef EXTERN
# if defined USEIMPORTLIB
# define EXTERN extern __declspec(dllimport)
# else
diff --git a/ext/Win32API/Win32API.c b/ext/Win32API/Win32API.c
index 27693c7257..3f0ceae9e1 100644
--- a/ext/Win32API/Win32API.c
+++ b/ext/Win32API/Win32API.c
@@ -2,7 +2,7 @@
Win32API - Ruby Win32 API Import Facility
*/
-#ifndef _MSC_VER
+#if !defined _MSC_VER && !defined NT
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <stdio.h>
diff --git a/ext/Win32API/extconf.rb b/ext/Win32API/extconf.rb
index 5af3243d96..f8d78e1465 100644
--- a/ext/Win32API/extconf.rb
+++ b/ext/Win32API/extconf.rb
@@ -1,4 +1,4 @@
-case PLATFORM
+case RUBY_PLATFORM
when /cygwin/,/mingw/
$CFLAGS = "-fno-defer-pop"
create_makefile("Win32API")
diff --git a/ext/curses/extconf.rb b/ext/curses/extconf.rb
index e1bf24c435..5c6881164a 100644
--- a/ext/curses/extconf.rb
+++ b/ext/curses/extconf.rb
@@ -1,7 +1,7 @@
require 'mkmf'
make=false
-have_library("mytinfo", "tgetent") if /bow/ =~ PLATFORM
+have_library("mytinfo", "tgetent") if /bow/ =~ RUBY_PLATFORM
if have_header("ncurses.h") and have_library("ncurses", "initscr")
make=true
elsif have_header("ncurses/curses.h") and have_library("ncurses", "initscr")
diff --git a/ext/extmk.rb.in b/ext/extmk.rb.in
index 7caa5985c2..279906830f 100644
--- a/ext/extmk.rb.in
+++ b/ext/extmk.rb.in
@@ -53,7 +53,7 @@ end
LINK = "@CC@ -o conftest -I#$topdir -I#$top_srcdir #{CFLAGS} -I#$includedir @LDFLAGS@ %s %s conftest.c %s %s @LIBS@"
CPP = "@CPP@ @CPPFLAGS@ -I#$topdir -I#$top_srcdir #{CFLAGS} -I#$includedir %s %s conftest.c"
-if /cygwin|mswin32|djgpp|mingw32|m68k-human|i386-os2_emx/i =~ RUBY_PLATFORM
+if /cygwin|mswin32|djgpp|mingw|m68k-human|i386-os2_emx/i =~ RUBY_PLATFORM
$null = open("nul", "w")
else
$null = open("/dev/null", "w")
@@ -158,7 +158,7 @@ end
def have_library(lib, func="main")
if func && func != ""
libs = append_library($libs, lib)
- if /mswin32/ =~ RUBY_PLATFORM
+ if /mswin32|mingw/ =~ RUBY_PLATFORM
r = try_link(<<"SRC", libs)
#include <windows.h>
#include <winsock.h>
@@ -210,7 +210,7 @@ end
def have_func(func)
libs = $libs
- if /mswin32/ =~ RUBY_PLATFORM
+ if /mswin32|mingw/ =~ RUBY_PLATFORM
r = try_link(<<"SRC", libs)
#include <windows.h>
#include <winsock.h>
@@ -253,7 +253,7 @@ def arg_config(config, default=nil)
unless defined? $configure_args
$configure_args = {}
args = "@configure_args@"
- if /mswin32/ =~ RUBY_PLATFORM and ENV["CONFIGURE_ARGS"]
+ if /mswin32|mingw/ =~ RUBY_PLATFORM and ENV["CONFIGURE_ARGS"]
args = args + " " + ENV["CONFIGURE_ARGS"]
end
for arg in args.split
@@ -340,7 +340,7 @@ def create_makefile(target)
end
defflag = ''
- if RUBY_PLATFORM =~ /cygwin/ and not $static
+ if RUBY_PLATFORM =~ /cygwin|mingw/ and not $static
if File.exist? target + ".def"
defflag = "--def=" + target + ".def"
end
diff --git a/ext/pty/extconf.rb b/ext/pty/extconf.rb
index 63383f7faf..4df2011eb5 100644
--- a/ext/pty/extconf.rb
+++ b/ext/pty/extconf.rb
@@ -2,7 +2,7 @@ require 'mkmf'
have_header("sys/stropts.h")
have_func("setresuid")
-$CFLAGS << "-DHAVE_DEV_PTMX" if /cygwin/ === PLATFORM
+$CFLAGS << "-DHAVE_DEV_PTMX" if /cygwin/ === RUBY_PLATFORM
if have_func("openpty") or
have_func("_getpty") or
have_func("ioctl")
diff --git a/ext/readline/extconf.rb b/ext/readline/extconf.rb
index 09d42f69c9..63ece61464 100644
--- a/ext/readline/extconf.rb
+++ b/ext/readline/extconf.rb
@@ -1,7 +1,7 @@
require "mkmf"
dir_config("readline")
-have_library("user32", nil) if /cygwin/ === PLATFORM
+have_library("user32", nil) if /cygwin/ === RUBY_PLATFORM
have_library("termcap", "tgetnum") or
have_library("curses", "tgetnum") or
have_library("ncurses", "tgetnum")
diff --git a/ext/socket/extconf.rb b/ext/socket/extconf.rb
index 91ac8f6123..46d5120e2e 100644
--- a/ext/socket/extconf.rb
+++ b/ext/socket/extconf.rb
@@ -2,8 +2,8 @@ require 'mkmf'
$LDFLAGS += " -L/usr/local/lib" if File.directory?("/usr/local/lib")
$CFLAGS += " -Dss_family=__ss_family -Dss_len=__ss_len"
-case PLATFORM
-when /mswin32/
+case RUBY_PLATFORM
+when /mswin32|mingw/
test_func = "WSACleanup"
have_library("wsock32", "WSACleanup")
have_func("closesocket")
diff --git a/ext/socket/sockport.h b/ext/socket/sockport.h
index 1639fcf828..e3750816c6 100644
--- a/ext/socket/sockport.h
+++ b/ext/socket/sockport.h
@@ -40,4 +40,9 @@
# define SET_SIN_LEN(si,len)
#endif
+#ifndef IN_MULTICAST
+# define IN_CLASSD(i) (((long)(i) & 0xf0000000) == 0xe0000000)
+# define IN_MULTICAST(i) IN_CLASSD(i)
+#endif
+
#endif
diff --git a/ext/tcltklib/extconf.rb b/ext/tcltklib/extconf.rb
index 713cc811e5..70a765a0b9 100644
--- a/ext/tcltklib/extconf.rb
+++ b/ext/tcltklib/extconf.rb
@@ -2,10 +2,12 @@
require 'mkmf'
-have_library("nsl", "t_open")
-have_library("socket", "socket")
-have_library("dl", "dlopen")
-have_library("m", "log")
+if RUBY_PLATFORM !~ /mswin32|mingw/
+ have_library("nsl", "t_open")
+ have_library("socket", "socket")
+ have_library("dl", "dlopen")
+ have_library("m", "log")
+end
dir_config("tk")
dir_config("tcl")
@@ -41,7 +43,7 @@ def find_tk(tklib)
end
if have_header("tcl.h") && have_header("tk.h") &&
- (/mswin32/ =~ RUBY_PLATFORM || find_library("X11", "XOpenDisplay",
+ (/mswin32|mingw|cygwin/ =~ RUBY_PLATFORM || find_library("X11", "XOpenDisplay",
"/usr/X11/lib", "/usr/X11R6/lib", "/usr/openwin/lib")) &&
find_tcl(tcllib) &&
find_tk(tklib)
diff --git a/ext/tcltklib/tcltklib.c b/ext/tcltklib/tcltklib.c
index e846e1f038..93f7745f28 100644
--- a/ext/tcltklib/tcltklib.c
+++ b/ext/tcltklib/tcltklib.c
@@ -34,6 +34,7 @@ static VALUE ip_invoke_real _((int, VALUE*, VALUE));
/* from tkAppInit.c */
+#if !defined __MINGW32__
/*
* The following variable is a special hack that is needed in order for
* Sun shared libraries to be used for Tcl.
@@ -41,6 +42,7 @@ static VALUE ip_invoke_real _((int, VALUE*, VALUE));
extern int matherr();
int *tclDummyMathPtr = (int *) matherr;
+#endif
/*---- module TclTkLib ----*/
@@ -487,8 +489,6 @@ _macinit()
void
Init_tcltklib()
{
- extern VALUE rb_argv0; /* the argv[0] */
-
VALUE lib = rb_define_module("TclTkLib");
VALUE ip = rb_define_class("TclTkIp", rb_cObject);
diff --git a/file.c b/file.c
index 421929d96f..0c5b148020 100644
--- a/file.c
+++ b/file.c
@@ -371,7 +371,7 @@ eaccess(path, mode)
const char *path;
int mode;
{
-#ifndef NT
+#ifdef S_IXGRP
struct stat st;
static int euid = -1;
@@ -699,7 +699,7 @@ static VALUE
test_sgid(obj, fname)
VALUE obj, fname;
{
-#ifndef NT
+#ifdef S_ISGID
Check_SafeStr(fname);
return check3rdbyte(RSTRING(fname)->ptr, S_ISGID);
#else
@@ -1013,7 +1013,7 @@ rb_file_s_utime(argc, argv)
# else
# include <sys/utime.h>
# endif
-# if defined(_MSC_VER)
+# if defined(_MSC_VER) || defined __MINGW32__
# define utimbuf _utimbuf
# endif
# else
@@ -1917,7 +1917,7 @@ static VALUE
rb_stat_sgid(obj)
VALUE obj;
{
-#ifndef NT
+#ifdef S_ISGID
if (get_stat(obj)->st_mode & S_ISGID) return Qtrue;
#endif
return Qfalse;
diff --git a/io.c b/io.c
index 9a5ef85845..075644abeb 100644
--- a/io.c
+++ b/io.c
@@ -1133,7 +1133,7 @@ VALUE
rb_io_binmode(io)
VALUE io;
{
-#if defined(NT) || defined(DJGPP) || defined(__CYGWIN__) || defined(__human68k__) || defined(__EMX__)
+#if defined _IOBIN || defined O_BINARY
OpenFile *fptr;
GetOpenFile(io, fptr);
diff --git a/lib/mkmf.rb b/lib/mkmf.rb
index 38ef9615c2..1301bf0f5d 100644
--- a/lib/mkmf.rb
+++ b/lib/mkmf.rb
@@ -143,7 +143,7 @@ def have_library(lib, func="main")
if func && func != ""
libs = append_library($libs, lib)
- if /mswin32/ =~ RUBY_PLATFORM
+ if /mswin32|mingw/ =~ RUBY_PLATFORM
r = try_link(<<"SRC", libs)
#include <windows.h>
#include <winsock.h>
@@ -205,7 +205,7 @@ def have_func(func)
libs = $libs
- if /mswin32/ =~ RUBY_PLATFORM
+ if /mswin32|mingw/ =~ RUBY_PLATFORM
r = try_link(<<"SRC", libs)
#include <windows.h>
#include <winsock.h>
@@ -339,7 +339,7 @@ def create_makefile(target)
end
defflag = ''
- if RUBY_PLATFORM =~ /cygwin/
+ if RUBY_PLATFORM =~ /cygwin|mingw/
if File.exist? target + ".def"
defflag = "--def=" + target + ".def"
end
diff --git a/missing/dir.h b/missing/dir.h
index 2e61f04443..830239b3ea 100644
--- a/missing/dir.h
+++ b/missing/dir.h
@@ -28,6 +28,7 @@
#ifndef __DIR_INCLUDED
#define __DIR_INCLUDED
+#if !defined __MINGW32__
/*Directory entry size */
#ifdef DIRSIZ
#undef DIRSIZ
@@ -60,4 +61,5 @@ void seekdir(DIR *dirp,long loc);
void rewinddir(DIR *dirp);
void closedir(DIR *dirp);
+#endif
#endif /* __DIR_INCLUDED */
diff --git a/missing/flock.c b/missing/flock.c
index 0eaa8d8fdb..78576d438c 100644
--- a/missing/flock.c
+++ b/missing/flock.c
@@ -126,7 +126,7 @@ flock(fd, operation)
return fcntl(fd, (operation & LOCK_NB) ? F_SETLK : F_SETLKW, &lock);
}
-#else
+#elif !defined NT
int
flock(fd, operation)
int fd;
diff --git a/missing/vsnprintf.c b/missing/vsnprintf.c
index 5865be7f9b..b29f14c0ec 100644
--- a/missing/vsnprintf.c
+++ b/missing/vsnprintf.c
@@ -101,7 +101,7 @@
#define __const
#endif /* People who don't like const sys_error */
-#ifdef NT
+#if defined NT && !defined __MINGW32__
typedef long size_t;
#endif
diff --git a/signal.c b/signal.c
index da0aef4670..d822c9b5b8 100644
--- a/signal.c
+++ b/signal.c
@@ -312,7 +312,7 @@ signal_exec(sig)
case SIGINT:
rb_thread_interrupt();
break;
-#if !defined(NT) && !defined(__human68k__)
+#ifdef SIGHUP
case SIGHUP:
#endif
#ifdef SIGQUIT
@@ -503,7 +503,7 @@ trap(arg)
if (func == SIG_DFL) {
switch (sig) {
case SIGINT:
-#if !defined(NT) && !defined(__human68k__)
+#ifdef SIGHUP
case SIGHUP:
#endif
#ifdef SIGQUIT
@@ -622,7 +622,7 @@ Init_signal()
#ifndef MACOS_UNUSE_SIGNAL
rb_define_global_function("trap", rb_f_trap, -1);
ruby_signal(SIGINT, sighandle);
-#ifndef NT
+#ifdef SIGHUP
ruby_signal(SIGHUP, sighandle);
#endif
#ifdef SIGQUIT
diff --git a/version.h b/version.h
index d49ce9b854..f94e6aa0b4 100644
--- a/version.h
+++ b/version.h
@@ -1,4 +1,4 @@
#define RUBY_VERSION "1.5.4"
-#define RUBY_RELEASE_DATE "2000-05-12"
+#define RUBY_RELEASE_DATE "2000-05-14"
#define RUBY_VERSION_CODE 154
-#define RUBY_RELEASE_CODE 20000512
+#define RUBY_RELEASE_CODE 20000514
diff --git a/win32/win32.c b/win32/win32.c
index a1e6d25ff3..6cafce993f 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -1169,7 +1169,7 @@ NtMakeCmdVector (char *cmdline, char ***vec, int InputCmd)
}
-#if 1
+#if !defined __MINGW32__
//
// UNIX compatible directory access functions for NT
//
@@ -1183,7 +1183,7 @@ NtMakeCmdVector (char *cmdline, char ***vec, int InputCmd)
//
DIR *
-opendir(char *filename)
+opendir(const char *filename)
{
DIR *p;
long len;
@@ -1524,8 +1524,8 @@ valid_filename(char *s)
// if we can prevent perl from trying to do stdio on sockets.
//
-EXTERN_C int __cdecl _alloc_osfhnd(void);
-EXTERN_C int __cdecl _set_osfhnd(int fh, long value);
+//EXTERN_C int __cdecl _alloc_osfhnd(void);
+//EXTERN_C int __cdecl _set_osfhnd(int fh, long value);
EXTERN_C void __cdecl _lock_fhandle(int);
EXTERN_C void __cdecl _unlock_fhandle(int);
EXTERN_C void __cdecl _unlock(int);
@@ -1534,18 +1534,23 @@ typedef struct {
long osfhnd; /* underlying OS file HANDLE */
char osfile; /* attributes of file (e.g., open in text mode?) */
char pipech; /* one char buffer for handles opened on pipes */
-#if defined (_MT) && !defined (DLL_FOR_WIN32S)
int lockinitflag;
CRITICAL_SECTION lock;
-#endif /* defined (_MT) && !defined (DLL_FOR_WIN32S) */
} ioinfo;
+#if !defined _CRTIMP
+#define _CRTIMP __declspec(dllimport)
+#endif
+
EXTERN_C _CRTIMP ioinfo * __pioinfo[];
#define IOINFO_L2E 5
#define IOINFO_ARRAY_ELTS (1 << IOINFO_L2E)
#define _pioinfo(i) (__pioinfo[i >> IOINFO_L2E] + (i & (IOINFO_ARRAY_ELTS - 1)))
-#define _osfile(i) (_pioinfo(i)->osfile)
+
+#define _osfhnd(i) (_pioinfo(i)->osfhnd)
+#define _osfile(i) (_pioinfo(i)->osfile)
+#define _pipech(i) (_pioinfo(i)->pipech)
#define FOPEN 0x01 /* file handle open */
#define FNOINHERIT 0x10 /* file handle opened O_NOINHERIT */
@@ -1553,6 +1558,20 @@ EXTERN_C _CRTIMP ioinfo * __pioinfo[];
#define FDEV 0x40 /* file handle refers to device */
#define FTEXT 0x80 /* file handle is in text mode */
+#define _set_osfhnd(fh, osfh) (void)(_osfhnd(fh) = osfh)
+
+static int
+_alloc_osfhnd(void)
+{
+ HANDLE hF = CreateFile("NUL", 0, 0, NULL, OPEN_ALWAYS, 0, NULL);
+ int fh = _open_osfhandle((long)hF, 0);
+ CloseHandle(hF);
+ if (fh == -1)
+ return fh;
+ EnterCriticalSection(&(_pioinfo(fh)->lock));
+ return fh;
+}
+
static int
my_open_osfhandle(long osfhandle, int flags)
{
@@ -1622,7 +1641,9 @@ myfdopen (int fd, const char *mode)
void
myfdclose(FILE *fp)
{
+#if !defined __MINGW32__
_free_osfhnd(fileno(fp));
+#endif
fclose(fp);
}
@@ -1639,7 +1660,9 @@ char *
mystrerror(int e)
{
static char buffer[512];
+#if !defined __MINGW32__
extern int sys_nerr;
+#endif
DWORD source = 0;
if (e < 0 || e > sys_nerr) {
diff --git a/win32/win32.h b/win32/win32.h
index cbcf4e8117..0bfe711a79 100644
--- a/win32/win32.h
+++ b/win32/win32.h
@@ -9,6 +9,7 @@
*
*/
+#undef EXTERN
#if defined(IMPORT)
#define EXTERN extern __declspec(dllimport)
#elif defined(EXPORT)
@@ -163,6 +164,12 @@ extern "C++" {
#define strncasecmp _strnicmp
/* these are defined in nt.c */
+#ifdef __MINGW32__
+struct timezone {
+ int tz_minuteswest;
+ int tz_dsttime;
+};
+#endif
extern int NtMakeCmdVector(char *, char ***, int);
extern void NtInitialize(int *, char ***);
extern char *NtGetLib(void);