• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

GNU Binutils with patches for OS216


Commit MetaInfo

Revision380f081b1e41c0cb0f517022150698c4cdb0a4a6 (tree)
Time2005-11-17 15:22:44
AuthorMark Mitchell <mark@code...>
CommiterMark Mitchell

Log Message

* gdb/remote-sim.c (gdbsim_wait): Don't use target_signal_to_host
or target_signal_from_host.
* sim/arm/wrapper.c (gdb/signals.h): Include it.
(SIGTRAP): Don't define it.
(SIGBUS): Likewise.
(sim_stop_reason): Use TARGET_SIGNAL_*.
* sim/common/sim-reason.c (sim_stop_reason): Use
sim_signal_to_target, not sim_signal_to_host.
* sim/common/sim-signal.c (sim_signal_to_host): Fix typo.
(sim_signal_to_target): New function.
* sim/common/sim-signal.h: Declare it.
* sim/d10v/interp.c (gdb/signals.h): Include it.
(sim_stop_reason): Use TARGET_SIGNAL_*.
* sim/erc32/interf.c: (gdb/signals.h): Include it.
(sim_stop_reason): Use TARGET_SIGNAL_*.
* sim/ppc/sim_calls.c (gdb/signals.h): Include it.
(sim_stop_reason): Use TARGET_SIGNAL_*.

Change Summary

Incremental Difference

--- /dev/null
+++ b/ChangeLog.csl
@@ -0,0 +1,31 @@
1+2005-11-16 Mark Mitchell <mark@codesourcery.com>
2+
3+ * gdb/remote-sim.c (gdbsim_wait): Don't use target_signal_to_host
4+ or target_signal_from_host.
5+ * sim/arm/wrapper.c (gdb/signals.h): Include it.
6+ (SIGTRAP): Don't define it.
7+ (SIGBUS): Likewise.
8+ (sim_stop_reason): Use TARGET_SIGNAL_*.
9+ * sim/common/sim-reason.c (sim_stop_reason): Use
10+ sim_signal_to_target, not sim_signal_to_host.
11+ * sim/common/sim-signal.c (sim_signal_to_host): Fix typo.
12+ (sim_signal_to_target): New function.
13+ * sim/common/sim-signal.h: Declare it.
14+ * sim/d10v/interp.c (gdb/signals.h): Include it.
15+ (sim_stop_reason): Use TARGET_SIGNAL_*.
16+ * sim/erc32/interf.c: (gdb/signals.h): Include it.
17+ (sim_stop_reason): Use TARGET_SIGNAL_*.
18+ * sim/ppc/sim_calls.c (gdb/signals.h): Include it.
19+ (sim_stop_reason): Use TARGET_SIGNAL_*.
20+
21+2005-11-16 Mark Mitchell <mark@codesourcery.com>
22+
23+ * sim/ppc/configure.ac (USE_WIN32API): Define it.
24+ (sys/errno.h): Add it to AC_CHECK_HEADERS list.
25+ * sim/ppc/configure.in: Regenerate.
26+ * sim/ppc/config.in: Likewise.
27+ * sim/ppc/emul_netbsd.c (sys/errno.h): Guard with HAVE_SYS_ERRNO_H.
28+ (write_timezone): Guard with HAVE_GETTIMEOFDAY.
29+ * sim/ppc/emul_unix.c (do_unix_mkdir): Handle Win32 1-argument mkdir.
30+
31+
--- a/gdb/remote-sim.c
+++ b/gdb/remote-sim.c
@@ -674,8 +674,7 @@ gdbsim_wait (ptid_t ptid, struct target_waitstatus *status)
674674 #else
675675 prev_sigint = signal (SIGINT, gdbsim_cntrl_c);
676676 #endif
677- sim_resume (gdbsim_desc, resume_step,
678- target_signal_to_host (resume_siggnal));
677+ sim_resume (gdbsim_desc, resume_step, resume_siggnal);
679678 signal (SIGINT, prev_sigint);
680679 resume_step = 0;
681680
@@ -690,24 +689,20 @@ gdbsim_wait (ptid_t ptid, struct target_waitstatus *status)
690689 case sim_stopped:
691690 switch (sigrc)
692691 {
693- case SIGABRT:
692+ case TARGET_SIGNAL_ABRT:
694693 quit ();
695694 break;
696- case SIGINT:
697- case SIGTRAP:
695+ case TARGET_SIGNAL_INT:
696+ case TARGET_SIGNAL_TRAP:
698697 default:
699698 status->kind = TARGET_WAITKIND_STOPPED;
700- /* The signal in sigrc is a host signal. That probably
701- should be fixed. */
702- status->value.sig = target_signal_from_host (sigrc);
699+ status->value.sig = sigrc;
703700 break;
704701 }
705702 break;
706703 case sim_signalled:
707704 status->kind = TARGET_WAITKIND_SIGNALLED;
708- /* The signal in sigrc is a host signal. That probably
709- should be fixed. */
710- status->value.sig = target_signal_from_host (sigrc);
705+ status->value.sig = sigrc;
711706 break;
712707 case sim_running:
713708 case sim_polling:
--- a/sim/arm/wrapper.c
+++ b/sim/arm/wrapper.c
@@ -37,14 +37,7 @@
3737 #include "sim-utils.h"
3838 #include "run-sim.h"
3939 #include "gdb/sim-arm.h"
40-
41-#ifndef SIGTRAP
42-#define SIGTRAP 5
43-#endif
44-
45-#ifndef SIGBUS
46-#define SIGBUS SIGSEGV
47-#endif
40+#include "gdb/signals.h"
4841
4942 host_callback *sim_callback;
5043
@@ -910,7 +903,7 @@ sim_stop_reason (sd, reason, sigrc)
910903 if (stop_simulator)
911904 {
912905 *reason = sim_stopped;
913- *sigrc = SIGINT;
906+ *sigrc = TARGET_SIGNAL_INT;
914907 }
915908 else if (state->EndCondition == 0)
916909 {
@@ -921,10 +914,10 @@ sim_stop_reason (sd, reason, sigrc)
921914 {
922915 *reason = sim_stopped;
923916 if (state->EndCondition == RDIError_BreakpointReached)
924- *sigrc = SIGTRAP;
917+ *sigrc = TARGET_SIGNAL_TRAP;
925918 else if ( state->EndCondition == RDIError_DataAbort
926919 || state->EndCondition == RDIError_AddressException)
927- *sigrc = SIGBUS;
920+ *sigrc = TARGET_SIGNAL_BUS;
928921 else
929922 *sigrc = 0;
930923 }
--- a/sim/common/sim-reason.c
+++ b/sim/common/sim-reason.c
@@ -35,21 +35,9 @@ sim_stop_reason (SIM_DESC sd, enum sim_stop *reason, int *sigrc)
3535 case sim_exited :
3636 *sigrc = engine->sigrc;
3737 break;
38- case sim_signalled :
39- /* ??? See the comment below case `sim_signalled' in
40- gdb/remote-sim.c:gdbsim_wait.
41- ??? Consider the case of the target requesting that it
42- kill(2) itself with SIGNAL. That SIGNAL, being target
43- specific, will not correspond to either of the SIM_SIGNAL
44- enum nor the HOST_SIGNAL. A mapping from TARGET_SIGNAL to
45- HOST_SIGNAL is needed. */
46- *sigrc = sim_signal_to_host (sd, engine->sigrc);
47- break;
4838 case sim_stopped :
49- /* The gdb/simulator interface calls for us to return the host
50- version of the signal which gdb then converts into the
51- target's version. This is obviously a bit clumsy. */
52- *sigrc = sim_signal_to_host (sd, engine->sigrc);
39+ case sim_signalled :
40+ *sigrc = sim_signal_to_target (sd, engine->sigrc);
5341 break;
5442 default :
5543 abort ();
--- a/sim/common/sim-signal.c
+++ b/sim/common/sim-signal.c
@@ -77,7 +77,7 @@ sim_signal_to_host (SIM_DESC sd, SIM_SIGNAL sig)
7777 break;
7878
7979 case SIM_SIGFPE:
80-#ifdef SIGXCPU
80+#ifdef SIGFPE
8181 return SIGFPE;
8282 #endif
8383 break;
@@ -94,3 +94,42 @@ sim_signal_to_host (SIM_DESC sd, SIM_SIGNAL sig)
9494 return 1;
9595 #endif
9696 }
97+
98+int
99+sim_signal_to_target (SIM_DESC sd, SIM_SIGNAL sig)
100+{
101+ switch (sig)
102+ {
103+ case SIM_SIGINT :
104+ return TARGET_SIGNAL_INT;
105+
106+ case SIM_SIGABRT :
107+ return TARGET_SIGNAL_ABRT;
108+
109+ case SIM_SIGILL :
110+ return TARGET_SIGNAL_ILL;
111+
112+ case SIM_SIGTRAP :
113+ return TARGET_SIGNAL_TRAP;
114+
115+ case SIM_SIGBUS :
116+ return TARGET_SIGNAL_BUS;
117+
118+ case SIM_SIGSEGV
119+ return TARGET_SIGNAL_SEGV;
120+
121+ case SIM_SIGXCPU :
122+ return TARGET_SIGNAL_XCPU;
123+
124+ case SIM_SIGFPE:
125+ return TARGET_SIGNAL_FPE;
126+ break;
127+
128+ case SIM_SIGNONE:
129+ return TARGET_SIGNAL_0;
130+ break;
131+ }
132+
133+ sim_io_eprintf (sd, "sim_signal_to_host: unknown signal: %d\n", sig);
134+ return TARGET_SIGNAL_HUP;
135+}
--- a/sim/common/sim-signal.h
+++ b/sim/common/sim-signal.h
@@ -21,6 +21,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
2121 #ifndef SIM_SIGNAL_H
2222 #define SIM_SIGNAL_H
2323
24+#include "gdb/signals.h"
25+
2426 /* Signals we use.
2527 This provides a layer between our values and host/target values. */
2628
@@ -45,5 +47,6 @@ typedef enum {
4547 } SIM_SIGNAL;
4648
4749 int sim_signal_to_host (SIM_DESC sd, SIM_SIGNAL);
50+enum target_signal sim_signal_to_target (SIM_DESC sd, SIM_SIGNAL);
4851
4952 #endif /* SIM_SIGNAL_H */
--- a/sim/d10v/interp.c
+++ b/sim/d10v/interp.c
@@ -6,6 +6,7 @@
66
77 #include "d10v_sim.h"
88 #include "gdb/sim-d10v.h"
9+#include "gdb/signals.h"
910
1011 enum _leftright { LEFT_FIRST, RIGHT_FIRST };
1112
@@ -1277,17 +1278,13 @@ sim_stop_reason (sd, reason, sigrc)
12771278
12781279 case SIG_D10V_BUS:
12791280 *reason = sim_stopped;
1280-#ifdef SIGBUS
1281- *sigrc = SIGBUS;
1282-#else
1283- *sigrc = SIGSEGV;
1284-#endif
1281+ *reson = TARGET_SIGNAL_BUS;
12851282 break;
12861283
12871284 default: /* some signal */
12881285 *reason = sim_stopped;
12891286 if (stop_simulator && !State.exception)
1290- *sigrc = SIGINT;
1287+ *sigrc = TARGET_SIGNAL_INT;
12911288 else
12921289 *sigrc = State.exception;
12931290 break;
--- a/sim/erc32/interf.c
+++ b/sim/erc32/interf.c
@@ -33,6 +33,7 @@
3333 #include "sim-config.h"
3434
3535 #include "gdb/remote-sim.h"
36+#include "gdb/signals.h"
3637
3738 #define PSR_CWP 0x7
3839
@@ -386,16 +387,13 @@ sim_stop_reason(sd, reason, sigrc)
386387 switch (simstat) {
387388 case CTRL_C:
388389 *reason = sim_stopped;
389- *sigrc = SIGINT;
390+ *sigrc = TARGET_SIGNAL_INT;
390391 break;
391392 case OK:
392393 case TIME_OUT:
393394 case BPT_HIT:
394395 *reason = sim_stopped;
395-#ifdef _WIN32
396-#define SIGTRAP 5
397-#endif
398- *sigrc = SIGTRAP;
396+ *sigrc = TARGET_SIGNAL_TRAP;
399397 break;
400398 case ERROR:
401399 *sigrc = 0;
--- a/sim/ppc/config.in
+++ b/sim/ppc/config.in
@@ -267,6 +267,9 @@
267267 */
268268 #undef HAVE_SYS_DIR_H
269269
270+/* Define to 1 if you have the <sys/errno.h> header file. */
271+#undef HAVE_SYS_ERRNO_H
272+
270273 /* Define to 1 if you have the <sys/ioctl.h> header file. */
271274 #undef HAVE_SYS_IOCTL_H
272275
@@ -398,6 +401,11 @@
398401 /* Define to 1 if your <sys/time.h> declares `struct tm'. */
399402 #undef TM_IN_SYS_TIME
400403
404+/* Define if we should use the Windows API, instead of the POSIX API. On
405+ Windows, we use the Windows API when building for MinGW, but the POSIX API
406+ when building for Cygwin. */
407+#undef USE_WIN32API
408+
401409 /* Define to 1 if your processor stores words with the most significant byte
402410 first (like Motorola and SPARC, unlike Intel and VAX). */
403411 #undef WORDS_BIGENDIAN
--- a/sim/ppc/configure
+++ b/sim/ppc/configure
@@ -992,7 +992,7 @@ esac
992992 else
993993 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
994994 fi
995- cd "$ac_popdir"
995+ cd $ac_popdir
996996 done
997997 fi
998998
@@ -2012,7 +2012,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20122012 cat conftest.err >&5
20132013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20142014 (exit $ac_status); } &&
2015- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
2015+ { ac_try='test -z "$ac_c_werror_flag"
2016+ || test ! -s conftest.err'
20162017 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20172018 (eval $ac_try) 2>&5
20182019 ac_status=$?
@@ -2070,7 +2071,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20702071 cat conftest.err >&5
20712072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20722073 (exit $ac_status); } &&
2073- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
2074+ { ac_try='test -z "$ac_c_werror_flag"
2075+ || test ! -s conftest.err'
20742076 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20752077 (eval $ac_try) 2>&5
20762078 ac_status=$?
@@ -2186,7 +2188,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21862188 cat conftest.err >&5
21872189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21882190 (exit $ac_status); } &&
2189- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
2191+ { ac_try='test -z "$ac_c_werror_flag"
2192+ || test ! -s conftest.err'
21902193 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21912194 (eval $ac_try) 2>&5
21922195 ac_status=$?
@@ -2240,7 +2243,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
22402243 cat conftest.err >&5
22412244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22422245 (exit $ac_status); } &&
2243- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
2246+ { ac_try='test -z "$ac_c_werror_flag"
2247+ || test ! -s conftest.err'
22442248 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22452249 (eval $ac_try) 2>&5
22462250 ac_status=$?
@@ -2285,7 +2289,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
22852289 cat conftest.err >&5
22862290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22872291 (exit $ac_status); } &&
2288- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
2292+ { ac_try='test -z "$ac_c_werror_flag"
2293+ || test ! -s conftest.err'
22892294 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22902295 (eval $ac_try) 2>&5
22912296 ac_status=$?
@@ -2329,7 +2334,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
23292334 cat conftest.err >&5
23302335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23312336 (exit $ac_status); } &&
2332- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
2337+ { ac_try='test -z "$ac_c_werror_flag"
2338+ || test ! -s conftest.err'
23332339 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23342340 (eval $ac_try) 2>&5
23352341 ac_status=$?
@@ -2525,7 +2531,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
25252531 cat conftest.err >&5
25262532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25272533 (exit $ac_status); } &&
2528- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
2534+ { ac_try='test -z "$ac_c_werror_flag"
2535+ || test ! -s conftest.err'
25292536 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25302537 (eval $ac_try) 2>&5
25312538 ac_status=$?
@@ -2579,7 +2586,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
25792586 cat conftest.err >&5
25802587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25812588 (exit $ac_status); } &&
2582- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
2589+ { ac_try='test -z "$ac_c_werror_flag"
2590+ || test ! -s conftest.err'
25832591 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25842592 (eval $ac_try) 2>&5
25852593 ac_status=$?
@@ -2894,7 +2902,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
28942902 cat conftest.err >&5
28952903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
28962904 (exit $ac_status); } &&
2897- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
2905+ { ac_try='test -z "$ac_c_werror_flag"
2906+ || test ! -s conftest.err'
28982907 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28992908 (eval $ac_try) 2>&5
29002909 ac_status=$?
@@ -3101,7 +3110,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
31013110 cat conftest.err >&5
31023111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
31033112 (exit $ac_status); } &&
3104- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3113+ { ac_try='test -z "$ac_c_werror_flag"
3114+ || test ! -s conftest.err'
31053115 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31063116 (eval $ac_try) 2>&5
31073117 ac_status=$?
@@ -3161,7 +3171,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
31613171 cat conftest.err >&5
31623172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
31633173 (exit $ac_status); } &&
3164- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3174+ { ac_try='test -z "$ac_c_werror_flag"
3175+ || test ! -s conftest.err'
31653176 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31663177 (eval $ac_try) 2>&5
31673178 ac_status=$?
@@ -3240,7 +3251,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
32403251 cat conftest.err >&5
32413252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
32423253 (exit $ac_status); } &&
3243- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3254+ { ac_try='test -z "$ac_c_werror_flag"
3255+ || test ! -s conftest.err'
32443256 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32453257 (eval $ac_try) 2>&5
32463258 ac_status=$?
@@ -3305,7 +3317,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
33053317 cat conftest.err >&5
33063318 echo "$as_me:$LINENO: \$? = $ac_status" >&5
33073319 (exit $ac_status); } &&
3308- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3320+ { ac_try='test -z "$ac_c_werror_flag"
3321+ || test ! -s conftest.err'
33093322 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33103323 (eval $ac_try) 2>&5
33113324 ac_status=$?
@@ -3370,7 +3383,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
33703383 cat conftest.err >&5
33713384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
33723385 (exit $ac_status); } &&
3373- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3386+ { ac_try='test -z "$ac_c_werror_flag"
3387+ || test ! -s conftest.err'
33743388 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33753389 (eval $ac_try) 2>&5
33763390 ac_status=$?
@@ -3434,7 +3448,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
34343448 cat conftest.err >&5
34353449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
34363450 (exit $ac_status); } &&
3437- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3451+ { ac_try='test -z "$ac_c_werror_flag"
3452+ || test ! -s conftest.err'
34383453 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34393454 (eval $ac_try) 2>&5
34403455 ac_status=$?
@@ -3515,7 +3530,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35153530 cat conftest.err >&5
35163531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
35173532 (exit $ac_status); } &&
3518- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3533+ { ac_try='test -z "$ac_c_werror_flag"
3534+ || test ! -s conftest.err'
35193535 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35203536 (eval $ac_try) 2>&5
35213537 ac_status=$?
@@ -3656,7 +3672,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
36563672 cat conftest.err >&5
36573673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
36583674 (exit $ac_status); } &&
3659- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3675+ { ac_try='test -z "$ac_c_werror_flag"
3676+ || test ! -s conftest.err'
36603677 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36613678 (eval $ac_try) 2>&5
36623679 ac_status=$?
@@ -3794,7 +3811,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
37943811 cat conftest.err >&5
37953812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
37963813 (exit $ac_status); } &&
3797- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3814+ { ac_try='test -z "$ac_c_werror_flag"
3815+ || test ! -s conftest.err'
37983816 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37993817 (eval $ac_try) 2>&5
38003818 ac_status=$?
@@ -3978,7 +3996,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
39783996 cat conftest.err >&5
39793997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
39803998 (exit $ac_status); } &&
3981- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3999+ { ac_try='test -z "$ac_c_werror_flag"
4000+ || test ! -s conftest.err'
39824001 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39834002 (eval $ac_try) 2>&5
39844003 ac_status=$?
@@ -4229,7 +4248,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
42294248 cat conftest.err >&5
42304249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
42314250 (exit $ac_status); } &&
4232- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
4251+ { ac_try='test -z "$ac_c_werror_flag"
4252+ || test ! -s conftest.err'
42334253 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42344254 (eval $ac_try) 2>&5
42354255 ac_status=$?
@@ -4423,7 +4443,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
44234443 cat conftest.err >&5
44244444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
44254445 (exit $ac_status); } &&
4426- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
4446+ { ac_try='test -z "$ac_c_werror_flag"
4447+ || test ! -s conftest.err'
44274448 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
44284449 (eval $ac_try) 2>&5
44294450 ac_status=$?
@@ -4526,7 +4547,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
45264547 cat conftest.err >&5
45274548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
45284549 (exit $ac_status); } &&
4529- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
4550+ { ac_try='test -z "$ac_c_werror_flag"
4551+ || test ! -s conftest.err'
45304552 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
45314553 (eval $ac_try) 2>&5
45324554 ac_status=$?
@@ -4597,7 +4619,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
45974619 cat conftest.err >&5
45984620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
45994621 (exit $ac_status); } &&
4600- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
4622+ { ac_try='test -z "$ac_c_werror_flag"
4623+ || test ! -s conftest.err'
46014624 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
46024625 (eval $ac_try) 2>&5
46034626 ac_status=$?
@@ -4694,7 +4717,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
46944717 cat conftest.err >&5
46954718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
46964719 (exit $ac_status); } &&
4697- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
4720+ { ac_try='test -z "$ac_c_werror_flag"
4721+ || test ! -s conftest.err'
46984722 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
46994723 (eval $ac_try) 2>&5
47004724 ac_status=$?
@@ -4830,7 +4854,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
48304854 cat conftest.err >&5
48314855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
48324856 (exit $ac_status); } &&
4833- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
4857+ { ac_try='test -z "$ac_c_werror_flag"
4858+ || test ! -s conftest.err'
48344859 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
48354860 (eval $ac_try) 2>&5
48364861 ac_status=$?
@@ -4894,7 +4919,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
48944919 cat conftest.err >&5
48954920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
48964921 (exit $ac_status); } &&
4897- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
4922+ { ac_try='test -z "$ac_c_werror_flag"
4923+ || test ! -s conftest.err'
48984924 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
48994925 (eval $ac_try) 2>&5
49004926 ac_status=$?
@@ -4949,7 +4975,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
49494975 cat conftest.err >&5
49504976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
49514977 (exit $ac_status); } &&
4952- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
4978+ { ac_try='test -z "$ac_c_werror_flag"
4979+ || test ! -s conftest.err'
49534980 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
49544981 (eval $ac_try) 2>&5
49554982 ac_status=$?
@@ -5089,7 +5116,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
50895116 cat conftest.err >&5
50905117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
50915118 (exit $ac_status); } &&
5092- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
5119+ { ac_try='test -z "$ac_c_werror_flag"
5120+ || test ! -s conftest.err'
50935121 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
50945122 (eval $ac_try) 2>&5
50955123 ac_status=$?
@@ -5222,7 +5250,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
52225250 cat conftest.err >&5
52235251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
52245252 (exit $ac_status); } &&
5225- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
5253+ { ac_try='test -z "$ac_c_werror_flag"
5254+ || test ! -s conftest.err'
52265255 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
52275256 (eval $ac_try) 2>&5
52285257 ac_status=$?
@@ -5499,7 +5528,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
54995528 cat conftest.err >&5
55005529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
55015530 (exit $ac_status); } &&
5502- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
5531+ { ac_try='test -z "$ac_c_werror_flag"
5532+ || test ! -s conftest.err'
55035533 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
55045534 (eval $ac_try) 2>&5
55055535 ac_status=$?
@@ -6005,7 +6035,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
60056035 cat conftest.err >&5
60066036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
60076037 (exit $ac_status); } &&
6008- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6038+ { ac_try='test -z "$ac_c_werror_flag"
6039+ || test ! -s conftest.err'
60096040 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
60106041 (eval $ac_try) 2>&5
60116042 ac_status=$?
@@ -6047,7 +6078,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
60476078 cat conftest.err >&5
60486079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
60496080 (exit $ac_status); } &&
6050- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6081+ { ac_try='test -z "$ac_c_werror_flag"
6082+ || test ! -s conftest.err'
60516083 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
60526084 (eval $ac_try) 2>&5
60536085 ac_status=$?
@@ -6104,7 +6136,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
61046136 cat conftest.err >&5
61056137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
61066138 (exit $ac_status); } &&
6107- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6139+ { ac_try='test -z "$ac_c_werror_flag"
6140+ || test ! -s conftest.err'
61086141 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
61096142 (eval $ac_try) 2>&5
61106143 ac_status=$?
@@ -6691,6 +6724,16 @@ rm conftest.sed
66916724
66926725 . ${srcdir}/../../bfd/configure.host
66936726
6727+case ${host} in
6728+ *mingw32*)
6729+
6730+cat >>confdefs.h <<\_ACEOF
6731+#define USE_WIN32API 1
6732+_ACEOF
6733+
6734+ ;;
6735+esac
6736+
66946737 ac_config_headers="$ac_config_headers config.h:config.in"
66956738
66966739
@@ -6726,7 +6769,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
67266769 cat conftest.err >&5
67276770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
67286771 (exit $ac_status); } &&
6729- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6772+ { ac_try='test -z "$ac_c_werror_flag"
6773+ || test ! -s conftest.err'
67306774 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
67316775 (eval $ac_try) 2>&5
67326776 ac_status=$?
@@ -6769,7 +6813,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
67696813 cat conftest.err >&5
67706814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
67716815 (exit $ac_status); } &&
6772- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6816+ { ac_try='test -z "$ac_c_werror_flag"
6817+ || test ! -s conftest.err'
67736818 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
67746819 (eval $ac_try) 2>&5
67756820 ac_status=$?
@@ -6839,7 +6884,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
68396884 cat conftest.err >&5
68406885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
68416886 (exit $ac_status); } &&
6842- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6887+ { ac_try='test -z "$ac_c_werror_flag"
6888+ || test ! -s conftest.err'
68436889 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68446890 (eval $ac_try) 2>&5
68456891 ac_status=$?
@@ -6882,7 +6928,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
68826928 cat conftest.err >&5
68836929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
68846930 (exit $ac_status); } &&
6885- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6931+ { ac_try='test -z "$ac_c_werror_flag"
6932+ || test ! -s conftest.err'
68866933 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68876934 (eval $ac_try) 2>&5
68886935 ac_status=$?
@@ -6962,7 +7009,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
69627009 cat conftest.err >&5
69637010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
69647011 (exit $ac_status); } &&
6965- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7012+ { ac_try='test -z "$ac_c_werror_flag"
7013+ || test ! -s conftest.err'
69667014 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
69677015 (eval $ac_try) 2>&5
69687016 ac_status=$?
@@ -7005,7 +7053,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
70057053 cat conftest.err >&5
70067054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
70077055 (exit $ac_status); } &&
7008- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7056+ { ac_try='test -z "$ac_c_werror_flag"
7057+ || test ! -s conftest.err'
70097058 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
70107059 (eval $ac_try) 2>&5
70117060 ac_status=$?
@@ -7075,7 +7124,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
70757124 cat conftest.err >&5
70767125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
70777126 (exit $ac_status); } &&
7078- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7127+ { ac_try='test -z "$ac_c_werror_flag"
7128+ || test ! -s conftest.err'
70797129 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
70807130 (eval $ac_try) 2>&5
70817131 ac_status=$?
@@ -7140,7 +7190,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
71407190 cat conftest.err >&5
71417191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
71427192 (exit $ac_status); } &&
7143- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7193+ { ac_try='test -z "$ac_c_werror_flag"
7194+ || test ! -s conftest.err'
71447195 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
71457196 (eval $ac_try) 2>&5
71467197 ac_status=$?
@@ -7186,7 +7237,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
71867237 cat conftest.err >&5
71877238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
71887239 (exit $ac_status); } &&
7189- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7240+ { ac_try='test -z "$ac_c_werror_flag"
7241+ || test ! -s conftest.err'
71907242 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
71917243 (eval $ac_try) 2>&5
71927244 ac_status=$?
@@ -7260,7 +7312,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
72607312 cat conftest.err >&5
72617313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
72627314 (exit $ac_status); } &&
7263- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7315+ { ac_try='test -z "$ac_c_werror_flag"
7316+ || test ! -s conftest.err'
72647317 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
72657318 (eval $ac_try) 2>&5
72667319 ac_status=$?
@@ -7451,7 +7504,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
74517504 cat conftest.err >&5
74527505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
74537506 (exit $ac_status); } &&
7454- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7507+ { ac_try='test -z "$ac_c_werror_flag"
7508+ || test ! -s conftest.err'
74557509 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
74567510 (eval $ac_try) 2>&5
74577511 ac_status=$?
@@ -7516,7 +7570,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
75167570 cat conftest.err >&5
75177571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
75187572 (exit $ac_status); } &&
7519- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7573+ { ac_try='test -z "$ac_c_werror_flag"
7574+ || test ! -s conftest.err'
75207575 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
75217576 (eval $ac_try) 2>&5
75227577 ac_status=$?
@@ -7581,7 +7636,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
75817636 cat conftest.err >&5
75827637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
75837638 (exit $ac_status); } &&
7584- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7639+ { ac_try='test -z "$ac_c_werror_flag"
7640+ || test ! -s conftest.err'
75857641 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
75867642 (eval $ac_try) 2>&5
75877643 ac_status=$?
@@ -7653,7 +7709,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
76537709 cat conftest.err >&5
76547710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
76557711 (exit $ac_status); } &&
7656- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7712+ { ac_try='test -z "$ac_c_werror_flag"
7713+ || test ! -s conftest.err'
76577714 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
76587715 (eval $ac_try) 2>&5
76597716 ac_status=$?
@@ -7714,7 +7771,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
77147771 cat conftest.err >&5
77157772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
77167773 (exit $ac_status); } &&
7717- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7774+ { ac_try='test -z "$ac_c_werror_flag"
7775+ || test ! -s conftest.err'
77187776 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
77197777 (eval $ac_try) 2>&5
77207778 ac_status=$?
@@ -7904,7 +7962,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
79047962 cat conftest.err >&5
79057963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
79067964 (exit $ac_status); } &&
7907- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7965+ { ac_try='test -z "$ac_c_werror_flag"
7966+ || test ! -s conftest.err'
79087967 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
79097968 (eval $ac_try) 2>&5
79107969 ac_status=$?
@@ -7955,7 +8014,8 @@ done
79558014
79568015
79578016
7958-for ac_header in fcntl.h stdlib.h string.h strings.h sys/ioctl.h sys/mount.h sys/param.h sys/resource.h sys/stat.h sys/termio.h sys/termios.h sys/time.h sys/times.h sys/types.h time.h unistd.h sys/vfs.h sys/statfs.h
8017+
8018+for ac_header in fcntl.h stdlib.h string.h strings.h sys/ioctl.h sys/mount.h sys/param.h sys/resource.h sys/stat.h sys/termio.h sys/termios.h sys/time.h sys/times.h sys/types.h time.h unistd.h sys/vfs.h sys/statfs.h sys/errno.h
79598019 do
79608020 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
79618021 if eval "test \"\${$as_ac_Header+set}\" = set"; then
@@ -7988,7 +8048,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
79888048 cat conftest.err >&5
79898049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
79908050 (exit $ac_status); } &&
7991- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8051+ { ac_try='test -z "$ac_c_werror_flag"
8052+ || test ! -s conftest.err'
79928053 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
79938054 (eval $ac_try) 2>&5
79948055 ac_status=$?
@@ -8143,7 +8204,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
81438204 cat conftest.err >&5
81448205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
81458206 (exit $ac_status); } &&
8146- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8207+ { ac_try='test -z "$ac_c_werror_flag"
8208+ || test ! -s conftest.err'
81478209 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
81488210 (eval $ac_try) 2>&5
81498211 ac_status=$?
@@ -8215,7 +8277,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
82158277 cat conftest.err >&5
82168278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
82178279 (exit $ac_status); } &&
8218- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8280+ { ac_try='test -z "$ac_c_werror_flag"
8281+ || test ! -s conftest.err'
82198282 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
82208283 (eval $ac_try) 2>&5
82218284 ac_status=$?
@@ -8269,7 +8332,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
82698332 cat conftest.err >&5
82708333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
82718334 (exit $ac_status); } &&
8272- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8335+ { ac_try='test -z "$ac_c_werror_flag"
8336+ || test ! -s conftest.err'
82738337 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
82748338 (eval $ac_try) 2>&5
82758339 ac_status=$?
@@ -8340,7 +8404,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
83408404 cat conftest.err >&5
83418405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
83428406 (exit $ac_status); } &&
8343- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8407+ { ac_try='test -z "$ac_c_werror_flag"
8408+ || test ! -s conftest.err'
83448409 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
83458410 (eval $ac_try) 2>&5
83468411 ac_status=$?
@@ -8394,7 +8459,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
83948459 cat conftest.err >&5
83958460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
83968461 (exit $ac_status); } &&
8397- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8462+ { ac_try='test -z "$ac_c_werror_flag"
8463+ || test ! -s conftest.err'
83988464 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
83998465 (eval $ac_try) 2>&5
84008466 ac_status=$?
@@ -8465,7 +8531,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
84658531 cat conftest.err >&5
84668532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84678533 (exit $ac_status); } &&
8468- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8534+ { ac_try='test -z "$ac_c_werror_flag"
8535+ || test ! -s conftest.err'
84698536 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84708537 (eval $ac_try) 2>&5
84718538 ac_status=$?
@@ -8524,7 +8591,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
85248591 cat conftest.err >&5
85258592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
85268593 (exit $ac_status); } &&
8527- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8594+ { ac_try='test -z "$ac_c_werror_flag"
8595+ || test ! -s conftest.err'
85288596 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
85298597 (eval $ac_try) 2>&5
85308598 ac_status=$?
@@ -8592,7 +8660,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
85928660 cat conftest.err >&5
85938661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
85948662 (exit $ac_status); } &&
8595- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8663+ { ac_try='test -z "$ac_c_werror_flag"
8664+ || test ! -s conftest.err'
85968665 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
85978666 (eval $ac_try) 2>&5
85988667 ac_status=$?
@@ -8654,7 +8723,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86548723 cat conftest.err >&5
86558724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
86568725 (exit $ac_status); } &&
8657- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8726+ { ac_try='test -z "$ac_c_werror_flag"
8727+ || test ! -s conftest.err'
86588728 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
86598729 (eval $ac_try) 2>&5
86608730 ac_status=$?
@@ -8727,7 +8797,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
87278797 cat conftest.err >&5
87288798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
87298799 (exit $ac_status); } &&
8730- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8800+ { ac_try='test -z "$ac_c_werror_flag"
8801+ || test ! -s conftest.err'
87318802 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
87328803 (eval $ac_try) 2>&5
87338804 ac_status=$?
@@ -8791,7 +8862,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
87918862 cat conftest.err >&5
87928863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
87938864 (exit $ac_status); } &&
8794- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8865+ { ac_try='test -z "$ac_c_werror_flag"
8866+ || test ! -s conftest.err'
87958867 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
87968868 (eval $ac_try) 2>&5
87978869 ac_status=$?
@@ -9938,6 +10010,11 @@ esac
993810010 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
993910011 esac
994010012
10013+ if test x"$ac_file" != x-; then
10014+ { echo "$as_me:$LINENO: creating $ac_file" >&5
10015+echo "$as_me: creating $ac_file" >&6;}
10016+ rm -f "$ac_file"
10017+ fi
994110018 # Let's still pretend it is `configure' which instantiates (i.e., don't
994210019 # use $as_me), people would be surprised to read:
994310020 # /* config.h. Generated by config.status. */
@@ -9976,12 +10053,6 @@ echo "$as_me: error: cannot find input file: $f" >&2;}
997610053 fi;;
997710054 esac
997810055 done` || { (exit 1); exit 1; }
9979-
9980- if test x"$ac_file" != x-; then
9981- { echo "$as_me:$LINENO: creating $ac_file" >&5
9982-echo "$as_me: creating $ac_file" >&6;}
9983- rm -f "$ac_file"
9984- fi
998510056 _ACEOF
998610057 cat >>$CONFIG_STATUS <<_ACEOF
998710058 sed "$ac_vpsub
--- a/sim/ppc/configure.ac
+++ b/sim/ppc/configure.ac
@@ -567,6 +567,16 @@ AC_ARG_PROGRAM
567567
568568 . ${srcdir}/../../bfd/configure.host
569569
570+case ${host} in
571+ *mingw32*)
572+ AC_DEFINE(USE_WIN32API, 1,
573+ [Define if we should use the Windows API, instead of the
574+ POSIX API. On Windows, we use the Windows API when
575+ building for MinGW, but the POSIX API when building
576+ for Cygwin.])
577+ ;;
578+esac
579+
570580 AC_CONFIG_HEADER(config.h:config.in)
571581
572582 AC_STRUCT_ST_BLKSIZE
@@ -584,7 +594,7 @@ AC_TYPE_UID_T
584594
585595 AC_CHECK_FUNCS(access cfgetispeed cfgetospeed cfsetispeed cfsetospeed chdir chmod chown dup dup2 fchmod fchown fcntl fstat fstatfs getdirentries getegid geteuid getgid getpid getppid getrusage gettimeofday getuid ioctl kill link lseek lstat mkdir pipe readlink rmdir setreuid setregid stat sigprocmask stat symlink tcgetattr tcsetattr tcsendbreak tcdrain tcflush tcflow tcgetpgrp tcsetpgrp time umask unlink)
586596
587-AC_CHECK_HEADERS(fcntl.h stdlib.h string.h strings.h sys/ioctl.h sys/mount.h sys/param.h sys/resource.h sys/stat.h sys/termio.h sys/termios.h sys/time.h sys/times.h sys/types.h time.h unistd.h sys/vfs.h sys/statfs.h)
597+AC_CHECK_HEADERS(fcntl.h stdlib.h string.h strings.h sys/ioctl.h sys/mount.h sys/param.h sys/resource.h sys/stat.h sys/termio.h sys/termios.h sys/time.h sys/times.h sys/types.h time.h unistd.h sys/vfs.h sys/statfs.h sys/errno.h)
588598 AC_HEADER_DIRENT
589599
590600 dnl Figure out what type of termio/termios support there is
--- a/sim/ppc/emul_netbsd.c
+++ b/sim/ppc/emul_netbsd.c
@@ -43,7 +43,9 @@
4343 #include <signal.h>
4444 #include <fcntl.h>
4545 #include <errno.h>
46+#ifdef HAVE_SYS_ERRNO_H
4647 #include <sys/errno.h>
48+#endif
4749 #include <sys/param.h>
4850 #include <sys/time.h>
4951
@@ -224,7 +226,7 @@ write_timeval(unsigned_word addr,
224226 emul_write_buffer(&t, addr, sizeof(t), processor, cia);
225227 }
226228
227-
229+#ifdef HAVE_GETTIMEOFDAY
228230 STATIC_INLINE_EMUL_NETBSD void
229231 write_timezone(unsigned_word addr,
230232 struct timezone tz,
@@ -235,6 +237,7 @@ write_timezone(unsigned_word addr,
235237 H2T(tz.tz_dsttime);
236238 emul_write_buffer(&tz, addr, sizeof(tz), processor, cia);
237239 }
240+#endif
238241
239242
240243 #ifdef HAVE_GETDIRENTRIES
--- a/sim/ppc/emul_unix.c
+++ b/sim/ppc/emul_unix.c
@@ -730,7 +730,11 @@ do_unix_mkdir(os_emul_data *emul,
730730 if (WITH_TRACE && ppc_trace[trace_os_emul])
731731 printf_filtered ("0x%lx [%s], 0%3o", (long)path_addr, path, mode);
732732
733+#ifdef USE_WIN32API
734+ status = mkdir(path);
735+#else
733736 status = mkdir(path, mode);
737+#endif
734738 emul_write_status(processor, status, errno);
735739 }
736740 #endif
--- a/sim/ppc/sim_calls.c
+++ b/sim/ppc/sim_calls.c
@@ -44,6 +44,7 @@
4444 #include "bfd.h"
4545 #include "gdb/callback.h"
4646 #include "gdb/remote-sim.h"
47+#include "gdb/signals.h"
4748
4849 /* Define the rate at which the simulator should poll the host
4950 for a quit. */
@@ -197,13 +198,13 @@ sim_stop_reason (SIM_DESC sd, enum sim_stop *reason, int *sigrc)
197198 case was_continuing:
198199 *reason = sim_stopped;
199200 if (status.signal == 0)
200- *sigrc = SIGTRAP;
201+ *sigrc = TARGET_SIGNAL_TRAP;
201202 else
202203 *sigrc = status.signal;
203204 break;
204205 case was_trap:
205206 *reason = sim_stopped;
206- *sigrc = SIGTRAP;
207+ *sigrc = TARGET_SIGNAL_TRAP;
207208 break;
208209 case was_exited:
209210 *reason = sim_exited;