File: gdb-4.16.gnuwin32.diff

package info (click to toggle)
prc-tools 0.5.0r-3.1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 20,412 kB
  • ctags: 16,426
  • sloc: ansic: 35,388; makefile: 443; asm: 213; cpp: 194; perl: 59
file content (1253 lines) | stat: -rw-r--r-- 36,906 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
diff -urN gdb-4.16.orig/gdb/config/i386/cygwin32.mh gdb-4.16/gdb/config/i386/cygwin32.mh
--- gdb-4.16.orig/gdb/config/i386/cygwin32.mh	Thu Feb  1 13:38:32 1996
+++ gdb-4.16/gdb/config/i386/cygwin32.mh	Mon Jul  7 21:24:05 1997
@@ -1,6 +1,6 @@
 MH_CFLAGS=
 XM_FILE=xm-cygwin32.h
 TERMCAP= 
-NATDEPFILES=win32-nat.o
+NATDEPFILES=# win32-nat.o
 XM_CLIBS=-lkernel32
-
+XDEPFILES= ser-tcp.o
diff -urN gdb-4.16.orig/gdb/ser-tcp.c gdb-4.16/gdb/ser-tcp.c
--- gdb-4.16.orig/gdb/ser-tcp.c	Sat Mar 30 00:58:50 1996
+++ gdb-4.16/gdb/ser-tcp.c	Mon Jul  7 21:19:29 1997
@@ -25,7 +25,9 @@
 #include <arpa/inet.h>
 #include <netdb.h>
 #include <sys/socket.h>
+#ifndef _WIN32
 #include <netinet/tcp.h>
+#endif
 #include "signals.h"
 #include "gdb_string.h"
 
diff -urN gdb-4.16.orig/gdb/utils.c gdb-4.16/gdb/utils.c
--- gdb-4.16.orig/gdb/utils.c	Tue Apr 23 00:35:13 1996
+++ gdb-4.16/gdb/utils.c	Mon Jul  7 21:08:49 1997
@@ -1887,20 +1887,24 @@
 	if (status > 0)
 	  {
 	    int val;
-	    
+
+#ifndef __CYGWIN32__
 	    val = tgetnum ("li");
 	    if (val >= 0)
 	      lines_per_page = val;
 	    else
+#endif
 	      /* The number of lines per page is not mentioned
 		 in the terminal description.  This probably means
 		 that paging is not useful (e.g. emacs shell window),
 		 so disable paging.  */
 	      lines_per_page = UINT_MAX;
 	    
+#ifndef __CYGWIN32__
 	    val = tgetnum ("co");
 	    if (val >= 0)
 	      chars_per_line = val;
+#endif
 	  }
       }
   }
diff -urN gdb-4.16.orig/readline/ChangeLog gdb-4.16/readline/ChangeLog
--- gdb-4.16.orig/readline/ChangeLog	Mon Apr  8 01:25:05 1996
+++ gdb-4.16/readline/ChangeLog	Mon Jul  7 21:08:49 1997
@@ -1,9 +1,76 @@
+Tue Oct  8 08:59:24 1996  Stu Grossman  (grossman@critters.cygnus.com)
+
+	* tilde.c (tilde_word_expand):  __MSDOS___ -> __MSDOS__
+
+Sat Oct 05 11:24:34 1996  Mark Alexander  <marka@cygnus.com>
+
+	* rldefs.h: On Linux, include <termios.h> to fix compile error
+	in <termcap.h>.
+
+Wed Sep  4 18:06:51 1996  Stu Grossman  (grossman@critters.cygnus.com)
+
+	* rldefs.h:  Enable HANDLE_SIGNALS for cygwin32.
+
+Thu Aug 29 16:59:45 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
+
+	* configure.in (i[345]86-*-*): Recognize i686 for pentium pro.
+
+Fri Aug 16 17:49:57 1996  Stu Grossman  (grossman@critters.cygnus.com)
+
+	* complete.c:  Include <pwd.h> if not DOS, and if cygwin32 or not
+	win32.
+	* configure.in:  Add test for *-*-cygwin32* to use config/mh-posix.
+	* readline.c:  Move decl of tgetstr to rldefs.h.
+	* (_rl_set_screen_size):  Remove redundant ifdef MINIMALs.
+	* rldefs.h:  Don't do MINIMAL for cygwin32.  Cygwin32 now uses
+	full-blown readline, except for termcap.
+
+Sun Aug 11 21:06:26 1996  Stu Grossman  (grossman@critters.cygnus.com)
+
+	* rldefs.c:  Get rid of define of SIGALRM if _WIN32 or __MSDOS__.
+	* Don't define ScreenCols/ScreenRows/... if cygwin32.
+	* sysdep-norm.h:  Don't include <malloc.h> if cygwin32.
+
+Sun Aug 11 14:59:09 1996  Fred Fish  <fnf@cygnus.com>
+
+	* rldefs.h:  If __osf__is defined, include <termio.h> instead of
+	<sgtty.h>.
+
+Fri Aug  9 08:54:26 1996  Stu Grossman  (grossman@critters.cygnus.com)
+
+	* bind.c complete.c history.c readline.c:  Don't include sys/file.h.
+	* complete.c display.c parens.c readline.c rldefs.h rltty.c
+	signals.c tilde.c:  Change refs to _MSC_VER and __WIN32__ to _WIN32.
+	* signals.c (rl_signal_handler):  Ifdef out kill if _WIN32.
+	* sysdep-norm.h:  Ifdef out include of dirent.h if _WIN32.
+	Include malloc.h if _WIN32.
+
+Thu Jul 18 15:59:35 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
+
+	* rldefs.h (sys/uio.h) Before sys/stream.h is included under AIX,
+	include sys/uio.h, which prevents an undefined structure used in a
+	prototype message from being generated.
+
+Tue Jun 25 23:05:55 1996  Jason Molenda  (crash@godzilla.cygnus.co.jp)
+
+        * Makefile.in (datadir): Set to $(prefix)/share.
+	(docdir): Removed.
+
+Sun May 26 15:14:42 1996  Fred Fish  <fnf@cygnus.com>
+
+	From: David Mosberger-Tang  <davidm@azstarnet.com>
+
+	* sysdep-linux.h: New file.
+	* display.c: Add include of "sysdep.h" to get HAVE_VARARGS_H.
+	* configure.in: Change pattern i[345]86-*-linux* into *-*-linux* to
+	support non-x86 based Linux platforms.
+
 Sun Apr  7 22:06:11 1996  Fred Fish  <fnf@cygnus.com>
 
 	From: Miles Bader  <miles@gnu.ai.mit.edu>
 	* config/mh-gnu: New file.
 	* configure.in (*-*-gnu*): New host.
-	
+
 Sun Apr  7 13:21:51 1996  Fred Fish  <fnf@cygnus.com>
 
 	From: Robert Lipe <robertl@dgii.com>
diff -urN gdb-4.16.orig/readline/Makefile.in gdb-4.16/readline/Makefile.in
--- gdb-4.16.orig/readline/Makefile.in	Tue Oct 10 16:44:02 1995
+++ gdb-4.16/readline/Makefile.in	Mon Jul  7 21:08:49 1997
@@ -29,7 +29,7 @@
 bindir = $(exec_prefix)/bin
 libdir = $(exec_prefix)/lib
 
-datadir = $(prefix)/lib
+datadir = $(prefix)/share
 mandir = $(prefix)/man
 man1dir = $(mandir)/man1
 man2dir = $(mandir)/man2
@@ -42,7 +42,6 @@
 man9dir = $(mandir)/man9
 infodir = $(prefix)/info
 includedir = $(prefix)/include
-docdir = $(datadir)/doc
 
 SHELL = /bin/sh
 
diff -urN gdb-4.16.orig/readline/bind.c gdb-4.16/readline/bind.c
--- gdb-4.16.orig/readline/bind.c	Thu Feb 24 07:19:01 1994
+++ gdb-4.16/readline/bind.c	Mon Jul  7 21:08:49 1997
@@ -23,9 +23,6 @@
 #include "sysdep.h"
 #include <stdio.h>
 #include <fcntl.h>
-#ifndef	NO_SYS_FILE
-#include <sys/file.h>
-#endif
 
 #include <errno.h>
 /* Not all systems declare ERRNO in errno.h... and some systems #define it! */
diff -urN gdb-4.16.orig/readline/complete.c gdb-4.16/readline/complete.c
--- gdb-4.16.orig/readline/complete.c	Wed Jan  3 21:48:22 1996
+++ gdb-4.16/readline/complete.c	Mon Jul  7 21:08:49 1997
@@ -23,9 +23,6 @@
 #include "sysdep.h"
 #include <stdio.h>
 #include <fcntl.h>
-#if !defined (NO_SYS_FILE)
-#  include <sys/file.h>
-#endif /* !NO_SYS_FILE */
 
 #include <errno.h>
 /* Not all systems declare ERRNO in errno.h... and some systems #define it! */
@@ -35,7 +32,7 @@
 
 /* These next are for filename completion.  Perhaps this belongs
    in a different place. */
-#if !defined(__MSDOS__) && !defined(_MSC_VER)
+#if !defined __MSDOS__ && (defined __CYGWIN32__ || ! defined _WIN32)
 #include <pwd.h>
 #endif /* __MSDOS__ */
 #if defined (USG) && !defined (isc386) && !defined (sgi)
@@ -1047,7 +1044,7 @@
      int state;
      char *text;
 {
-#if !defined(__WIN32__) && !defined(_MSC_VER)
+#if !defined(_WIN32)
   static DIR *directory;
   static char *filename = (char *)NULL;
   static char *dirname = (char *)NULL;
diff -urN gdb-4.16.orig/readline/configure.in gdb-4.16/readline/configure.in
--- gdb-4.16.orig/readline/configure.in	Mon Apr  8 01:17:28 1996
+++ gdb-4.16/readline/configure.in	Mon Jul  7 21:08:49 1997
@@ -13,8 +13,9 @@
 links=sysdep.h
 
 case "${host}" in
+  *-*-cygwin32*)	host_makefile_frag=config/mh-posix ;;
   *-*-irix*)		host_makefile_frag=config/mh-sysv; files=sysdep-irix.h;;
-  i[345]86-ncr-sysv4*)	host_makefile_frag=config/mh-ncr3000 ;;
+  i[3456]86-ncr-sysv4*)	host_makefile_frag=config/mh-ncr3000 ;;
 # Using sysdep-norm.h is harmful because termio.h defines VWERASE even though
 # c_cc is too small for it (VWERASE is for termios).
 # The problem with _POSIX_SOURCE is said not to be a problem after all.
@@ -25,17 +26,17 @@
   m88*-harris-cxux7*)	host_makefile_frag=config/mh-sysv4 ; files=sysdep-cxux7.h ;;
   *-*-sysv4*)		host_makefile_frag=config/mh-sysv4 ; files=sysdep-sysv4.h ;;
   *-*-solaris2*)	host_makefile_frag=config/mh-sysv4 ;;
-  i[345]86-*-sco3.2v[45]*)	host_makefile_frag=config/mh-sco4; files=sysdep-sco.h ;;
-  i[345]86-*-sco*)	host_makefile_frag=config/mh-sco; files=sysdep-sco.h ;;
+  i[3456]86-*-sco3.2v[45]*)	host_makefile_frag=config/mh-sco4; files=sysdep-sco.h ;;
+  i[3456]86-*-sco*)	host_makefile_frag=config/mh-sco; files=sysdep-sco.h ;;
 # Don't use this; ISC 4.0 only supports POSIX features if you link with
 # -lcposix.  No thanks.
-#  i[345]86-*-isc*)	host_makefile_frag=config/mh-isc ;;
-  i[345]86-*-isc*)	host_makefile_frag=config/mh-sysv ;;
+#  i[3456]86-*-isc*)	host_makefile_frag=config/mh-isc ;;
+  i[3456]86-*-isc*)	host_makefile_frag=config/mh-sysv ;;
   *-*-go32)		host_makefile_frag=config/mh-go32 ;;
   m68k-apollo-sysv*)	host_makefile_frag=config/mh-apollo68v ;;    
   *-*-sysv*)		host_makefile_frag=config/mh-sysv ;;
   *-*-m88kbcs*)		host_makefile_frag=config/mh-sysv ;;
-  i[345]86-*-linux*)	host_makefile_frag=config/mh-posix ;;
+  *-*-linux*)		host_makefile_frag=config/mh-posix ;;
   powerpc-ibm-aix*)	host_makefile_frag=config/mh-sysv; files=sysdep-aix.h ;;
   rs6000-ibm-aix*)	host_makefile_frag=config/mh-sysv; files=sysdep-aix.h ;;
   rs6000-bull-bosx*)	host_makefile_frag=config/mh-sysv; files=sysdep-aix.h ;;
diff -urN gdb-4.16.orig/readline/display.c gdb-4.16/readline/display.c
--- gdb-4.16.orig/readline/display.c	Wed Jan  3 21:48:22 1996
+++ gdb-4.16/readline/display.c	Mon Jul  7 21:08:49 1997
@@ -20,6 +20,7 @@
    have a copy of the license, write to the Free Software Foundation,
    675 Mass Ave, Cambridge, MA 02139, USA. */
 
+#include "sysdep.h"
 #include <stdio.h>
 #include <sys/types.h>
 
@@ -521,7 +522,7 @@
      of moving backwards. */
   if (new + 1 < _rl_last_c_pos - new)
     {
-#if defined(__MSDOS__) || defined(__WIN32__) || defined (_MSC_VER)
+#if defined(__MSDOS__) || defined(_WIN32)
       putc('\r', rl_outstream);
 #else
       tputs (term_cr, 1, _rl_output_character_function);
@@ -734,8 +735,7 @@
      char *string;
      int count;
 {
-#if defined(__WIN32__) || defined(_MSC_VER)
-
+#if defined(_WIN32)
 #else
 #if defined (__GO32__)
   int row, col, width;
@@ -791,7 +791,7 @@
 delete_chars (count)
      int count;
 {
-#if defined(__WIN32__) || defined(_MSC_VER)
+#if defined(_WIN32)
 
 #else
 #if defined (__GO32__)
diff -urN gdb-4.16.orig/readline/foo gdb-4.16/readline/foo
--- gdb-4.16.orig/readline/foo	Wed Dec 31 19:00:00 1969
+++ gdb-4.16/readline/foo	Mon Jul  7 21:08:49 1997
@@ -0,0 +1,256 @@
+--- bind.c	Tue Apr 15 04:23:30 1997
++++ /home/jeff/pilot-tst/src/gdb-4.16/readline/bind.c	Thu Feb 24 07:19:01 1994
+@@ -23,6 +23,9 @@
+ #include "sysdep.h"
+ #include <stdio.h>
+ #include <fcntl.h>
++#ifndef	NO_SYS_FILE
++#include <sys/file.h>
++#endif
+ 
+ #include <errno.h>
+ /* Not all systems declare ERRNO in errno.h... and some systems #define it! */
+--- complete.c	Tue Apr 15 04:23:30 1997
++++ /home/jeff/pilot-tst/src/gdb-4.16/readline/complete.c	Wed Jan  3 21:48:22 1996
+@@ -23,6 +23,9 @@
+ #include "sysdep.h"
+ #include <stdio.h>
+ #include <fcntl.h>
++#if !defined (NO_SYS_FILE)
++#  include <sys/file.h>
++#endif /* !NO_SYS_FILE */
+ 
+ #include <errno.h>
+ /* Not all systems declare ERRNO in errno.h... and some systems #define it! */
+@@ -32,7 +35,7 @@
+ 
+ /* These next are for filename completion.  Perhaps this belongs
+    in a different place. */
+-#if !defined __MSDOS__ && (defined __CYGWIN32__ || ! defined _WIN32)
++#if !defined(__MSDOS__) && !defined(_MSC_VER)
+ #include <pwd.h>
+ #endif /* __MSDOS__ */
+ #if defined (USG) && !defined (isc386) && !defined (sgi)
+@@ -1044,7 +1047,7 @@
+      int state;
+      char *text;
+ {
+-#if !defined(_WIN32)
++#if !defined(__WIN32__) && !defined(_MSC_VER)
+   static DIR *directory;
+   static char *filename = (char *)NULL;
+   static char *dirname = (char *)NULL;
+--- display.c	Tue Apr 15 04:23:30 1997
++++ /home/jeff/pilot-tst/src/gdb-4.16/readline/display.c	Wed Jan  3 21:48:22 1996
+@@ -20,7 +20,6 @@
+    have a copy of the license, write to the Free Software Foundation,
+    675 Mass Ave, Cambridge, MA 02139, USA. */
+ 
+-#include "sysdep.h"
+ #include <stdio.h>
+ #include <sys/types.h>
+ 
+@@ -522,7 +521,7 @@
+      of moving backwards. */
+   if (new + 1 < _rl_last_c_pos - new)
+     {
+-#if defined(__MSDOS__) || defined(_WIN32)
++#if defined(__MSDOS__) || defined(__WIN32__) || defined (_MSC_VER)
+       putc('\r', rl_outstream);
+ #else
+       tputs (term_cr, 1, _rl_output_character_function);
+@@ -735,7 +734,8 @@
+      char *string;
+      int count;
+ {
+-#if defined(_WIN32)
++#if defined(__WIN32__) || defined(_MSC_VER)
++
+ #else
+ #if defined (__GO32__)
+   int row, col, width;
+@@ -791,7 +791,7 @@
+ delete_chars (count)
+      int count;
+ {
+-#if defined(_WIN32)
++#if defined(__WIN32__) || defined(_MSC_VER)
+ 
+ #else
+ #if defined (__GO32__)
+--- history.c	Tue Apr 15 04:23:31 1997
++++ /home/jeff/pilot-tst/src/gdb-4.16/readline/history.c	Sun Jun 12 06:54:45 1994
+@@ -42,6 +42,9 @@
+ 
+ extern char *getenv();
+ 
++#ifndef	NO_SYS_FILE
++#include <sys/file.h>
++#endif
+ #include <sys/stat.h>
+ #include <fcntl.h>
+ 
+--- parens.c	Tue Apr 15 04:23:31 1997
++++ /home/jeff/pilot-tst/src/gdb-4.16/readline/parens.c	Tue Oct 31 13:40:32 1995
+@@ -23,7 +23,7 @@
+ #include <stdio.h>
+ #include <sys/types.h>
+ 
+-#if defined(__GO32__) || defined(_WIN32)
++#if defined(__GO32__) || defined(__WIN32__)
+ #undef FD_SET
+ #endif
+ 
+--- readline.c	Tue Apr 15 04:23:31 1997
++++ /home/jeff/pilot-tst/src/gdb-4.16/readline/readline.c	Wed Jan  3 21:48:24 1996
+@@ -24,6 +24,9 @@
+ #include "sysdep.h"
+ #include <stdio.h>
+ #include <fcntl.h>
++#ifndef	NO_SYS_FILE
++#include <sys/file.h>
++#endif
+ #include <signal.h>
+ 
+ /* This is needed to include support for TIOCGWINSZ and window resizing. */
+@@ -59,6 +62,7 @@
+    to be visible to readline callers. */
+ 
+ /* Functions imported from other files in the library. */
++extern char *tgetstr ();
+ extern void rl_prep_terminal (), rl_deprep_terminal ();
+ extern void rl_vi_set_last ();
+ extern Function *rl_function_of_keyseq ();
+@@ -474,7 +478,7 @@
+ void
+ rl_gather_tyi ()
+ {
+-#if defined (MINIMAL) && !defined (_WIN32)
++#if defined (MINIMAL)
+   char input;
+ 
+   if (isatty (0))
+@@ -1149,6 +1153,7 @@
+ _rl_set_screen_size (tty, ignore_env)
+      int tty, ignore_env;
+ {
++#ifndef MINIMAL
+ #if defined (TIOCGWINSZ) && !defined (TIOCGWINSZ_BROKEN)
+   struct winsize window_size;
+ #endif /* TIOCGWINSZ */
+@@ -1204,6 +1209,7 @@
+      don't use the last column. */
+   if (!term_xn)
+     screenwidth--;
++#endif
+ }
+ #endif /* !MINIMAL */
+ 
+@@ -1772,7 +1778,7 @@
+   _rl_move_vert (curr_line);
+   _rl_move_cursor_relative (0, the_line);   /* XXX is this right */
+ 
+-#if defined (_WIN32)
++#if defined (__WIN32__) || defined (_MSC_VER)
+   abort();
+ #else
+ #if defined (__GO32__)
+@@ -3113,7 +3119,7 @@
+   int result;
+   unsigned char c;
+ 
+-#if defined (MINIMAL) && !defined (_WIN32)
++#if defined (MINIMAL)
+   if (isatty (0))
+     return (getkey () & 0x7f);
+ #endif /* MINIMAL */
+--- rltty.c	Tue Apr 15 04:23:31 1997
++++ /home/jeff/pilot-tst/src/gdb-4.16/readline/rltty.c	Sat Oct  7 20:44:06 1995
+@@ -24,6 +24,9 @@
+ #include <signal.h>
+ #include <errno.h>
+ #include <stdio.h>
++#ifndef	NO_SYS_FILE
++#include <sys/file.h>
++#endif
+ 
+ #if defined (HAVE_UNISTD_H)
+ #  include <unistd.h>
+--- signals.c	Tue Apr 15 04:23:31 1997
++++ /home/jeff/pilot-tst/src/gdb-4.16/readline/signals.c	Sat Oct  7 20:44:08 1995
+@@ -23,6 +23,9 @@
+ #include <stdio.h>
+ #include <sys/types.h>
+ #include <fcntl.h>
++#if !defined (NO_SYS_FILE)
++#  include <sys/file.h>
++#endif /* !NO_SYS_FILE */
+ #include <signal.h>
+ 
+ /* This is needed to include support for TIOCGWINSZ and window resizing. */
+@@ -149,9 +152,7 @@
+       rl_clear_signals ();
+       rl_pending_input = 0;
+ 
+-#ifndef _WIN32
+       kill (getpid (), sig);
+-#endif
+ 
+       SIGNALS_UNBLOCK;
+ 
+--- tilde.c	Tue Apr 15 04:23:32 1997
++++ /home/jeff/pilot-tst/src/gdb-4.16/readline/tilde.c	Thu Feb 24 07:19:32 1994
+@@ -27,7 +27,7 @@
+    GDB to add YET ANOTHER -I directive.  No thanks.  */
+ #include "tilde.h"
+ 
+-#if !defined(__MSDOS__) && !defined(_WIN32)
++#ifndef __MSDOS__
+ #include <pwd.h>
+ #endif
+ 
+@@ -218,7 +218,7 @@
+ 	  /* Prepend $HOME to the rest of the string. */
+ 	  char *temp_home = getenv ("HOME");
+ 
+-#if !defined (__MSDOS__) && !defined (_WIN32)
++#ifndef __MSDOS__
+ 	  /* If there is no HOME variable, look up the directory in
+ 	     the password database. */
+ 	  if (!temp_home)
+@@ -242,7 +242,7 @@
+ 	}
+       else
+ 	{
+-#if !defined (__MSDOS__) && !defined (_WIN32)
++#ifndef __MSDOS__
+ 	  struct passwd *user_entry;
+ #endif
+ 	  char *username = (char *)alloca (257);
+@@ -257,7 +257,7 @@
+ 	    }
+ 	  username[i - 1] = '\0';
+ 
+-#if !defined (__MSDOS__) && !defined (_WIN32)
++#ifndef __MSDOS__
+ 	  if (!(user_entry = getpwnam (username)))
+ 	    {
+ #endif
+@@ -281,7 +281,7 @@
+ 		    }
+ 		}
+ 	      /* We shouldn't report errors. */
+-#if !defined (__MSDOS__) && !defined (_WIN32)
++#ifndef __MSDOS__
+ 	    }
+ 	  else
+ 	    {
+@@ -293,7 +293,7 @@
+ 	    return_name:
+ 	      free (dirname);
+ 	      dirname = savestring (temp_name);
+-#if !defined (__MSDOS__) && !defined (_WIN32)
++#ifndef __MSDOS__
+ 	    }
+ 	    endpwent ();
+ #endif
diff -urN gdb-4.16.orig/readline/history.c gdb-4.16/readline/history.c
--- gdb-4.16.orig/readline/history.c	Sun Jun 12 06:54:45 1994
+++ gdb-4.16/readline/history.c	Mon Jul  7 21:08:49 1997
@@ -42,9 +42,6 @@
 
 extern char *getenv();
 
-#ifndef	NO_SYS_FILE
-#include <sys/file.h>
-#endif
 #include <sys/stat.h>
 #include <fcntl.h>
 
diff -urN gdb-4.16.orig/readline/parens.c gdb-4.16/readline/parens.c
--- gdb-4.16.orig/readline/parens.c	Tue Oct 31 13:40:32 1995
+++ gdb-4.16/readline/parens.c	Mon Jul  7 21:08:50 1997
@@ -23,7 +23,7 @@
 #include <stdio.h>
 #include <sys/types.h>
 
-#if defined(__GO32__) || defined(__WIN32__)
+#if defined(__GO32__) || defined(_WIN32)
 #undef FD_SET
 #endif
 
diff -urN gdb-4.16.orig/readline/readline.c gdb-4.16/readline/readline.c
--- gdb-4.16.orig/readline/readline.c	Wed Jan  3 21:48:24 1996
+++ gdb-4.16/readline/readline.c	Mon Jul  7 21:08:50 1997
@@ -24,9 +24,6 @@
 #include "sysdep.h"
 #include <stdio.h>
 #include <fcntl.h>
-#ifndef	NO_SYS_FILE
-#include <sys/file.h>
-#endif
 #include <signal.h>
 
 /* This is needed to include support for TIOCGWINSZ and window resizing. */
@@ -62,7 +59,6 @@
    to be visible to readline callers. */
 
 /* Functions imported from other files in the library. */
-extern char *tgetstr ();
 extern void rl_prep_terminal (), rl_deprep_terminal ();
 extern void rl_vi_set_last ();
 extern Function *rl_function_of_keyseq ();
@@ -478,7 +474,7 @@
 void
 rl_gather_tyi ()
 {
-#if defined (MINIMAL)
+#if defined (MINIMAL) && !defined (_WIN32)
   char input;
 
   if (isatty (0))
@@ -1153,7 +1149,6 @@
 _rl_set_screen_size (tty, ignore_env)
      int tty, ignore_env;
 {
-#ifndef MINIMAL
 #if defined (TIOCGWINSZ) && !defined (TIOCGWINSZ_BROKEN)
   struct winsize window_size;
 #endif /* TIOCGWINSZ */
@@ -1209,7 +1204,6 @@
      don't use the last column. */
   if (!term_xn)
     screenwidth--;
-#endif
 }
 #endif /* !MINIMAL */
 
@@ -1778,7 +1772,7 @@
   _rl_move_vert (curr_line);
   _rl_move_cursor_relative (0, the_line);   /* XXX is this right */
 
-#if defined (__WIN32__) || defined (_MSC_VER)
+#if defined (_WIN32)
   abort();
 #else
 #if defined (__GO32__)
@@ -3119,7 +3113,7 @@
   int result;
   unsigned char c;
 
-#if defined (MINIMAL)
+#if defined (MINIMAL) && !defined (_WIN32)
   if (isatty (0))
     return (getkey () & 0x7f);
 #endif /* MINIMAL */
diff -urN gdb-4.16.orig/readline/readline.patch gdb-4.16/readline/readline.patch
--- gdb-4.16.orig/readline/readline.patch	Wed Dec 31 19:00:00 1969
+++ gdb-4.16/readline/readline.patch	Mon Jul  7 21:08:50 1997
@@ -0,0 +1,389 @@
+--- /home/jeff/pilot-tst/src/gdb-4.16/readline/bind.c	Thu Feb 24 07:19:01 1994
++++ bind.c	Tue Apr 15 04:23:30 1997
+@@ -23,9 +23,6 @@
+ #include "sysdep.h"
+ #include <stdio.h>
+ #include <fcntl.h>
+-#ifndef	NO_SYS_FILE
+-#include <sys/file.h>
+-#endif
+ 
+ #include <errno.h>
+ /* Not all systems declare ERRNO in errno.h... and some systems #define it! */
+--- /home/jeff/pilot-tst/src/gdb-4.16/readline/complete.c	Wed Jan  3 21:48:22 1996
++++ complete.c	Tue Apr 15 04:23:30 1997
+@@ -23,9 +23,6 @@
+ #include "sysdep.h"
+ #include <stdio.h>
+ #include <fcntl.h>
+-#if !defined (NO_SYS_FILE)
+-#  include <sys/file.h>
+-#endif /* !NO_SYS_FILE */
+ 
+ #include <errno.h>
+ /* Not all systems declare ERRNO in errno.h... and some systems #define it! */
+@@ -35,7 +32,7 @@
+ 
+ /* These next are for filename completion.  Perhaps this belongs
+    in a different place. */
+-#if !defined(__MSDOS__) && !defined(_MSC_VER)
++#if !defined __MSDOS__ && (defined __CYGWIN32__ || ! defined _WIN32)
+ #include <pwd.h>
+ #endif /* __MSDOS__ */
+ #if defined (USG) && !defined (isc386) && !defined (sgi)
+@@ -1047,7 +1044,7 @@
+      int state;
+      char *text;
+ {
+-#if !defined(__WIN32__) && !defined(_MSC_VER)
++#if !defined(_WIN32)
+   static DIR *directory;
+   static char *filename = (char *)NULL;
+   static char *dirname = (char *)NULL;
+--- /home/jeff/pilot-tst/src/gdb-4.16/readline/display.c	Wed Jan  3 21:48:22 1996
++++ display.c	Tue Apr 15 04:23:30 1997
+@@ -20,6 +20,7 @@
+    have a copy of the license, write to the Free Software Foundation,
+    675 Mass Ave, Cambridge, MA 02139, USA. */
+ 
++#include "sysdep.h"
+ #include <stdio.h>
+ #include <sys/types.h>
+ 
+@@ -521,7 +522,7 @@
+      of moving backwards. */
+   if (new + 1 < _rl_last_c_pos - new)
+     {
+-#if defined(__MSDOS__) || defined(__WIN32__) || defined (_MSC_VER)
++#if defined(__MSDOS__) || defined(_WIN32)
+       putc('\r', rl_outstream);
+ #else
+       tputs (term_cr, 1, _rl_output_character_function);
+@@ -734,8 +735,7 @@
+      char *string;
+      int count;
+ {
+-#if defined(__WIN32__) || defined(_MSC_VER)
+-
++#if defined(_WIN32)
+ #else
+ #if defined (__GO32__)
+   int row, col, width;
+@@ -791,7 +791,7 @@
+ delete_chars (count)
+      int count;
+ {
+-#if defined(__WIN32__) || defined(_MSC_VER)
++#if defined(_WIN32)
+ 
+ #else
+ #if defined (__GO32__)
+--- /home/jeff/pilot-tst/src/gdb-4.16/readline/history.c	Sun Jun 12 06:54:45 1994
++++ history.c	Tue Apr 15 04:23:31 1997
+@@ -42,9 +42,6 @@
+ 
+ extern char *getenv();
+ 
+-#ifndef	NO_SYS_FILE
+-#include <sys/file.h>
+-#endif
+ #include <sys/stat.h>
+ #include <fcntl.h>
+ 
+--- /home/jeff/pilot-tst/src/gdb-4.16/readline/parens.c	Tue Oct 31 13:40:32 1995
++++ parens.c	Tue Apr 15 04:23:31 1997
+@@ -23,7 +23,7 @@
+ #include <stdio.h>
+ #include <sys/types.h>
+ 
+-#if defined(__GO32__) || defined(__WIN32__)
++#if defined(__GO32__) || defined(_WIN32)
+ #undef FD_SET
+ #endif
+ 
+--- /home/jeff/pilot-tst/src/gdb-4.16/readline/readline.c	Wed Jan  3 21:48:24 1996
++++ readline.c	Tue Apr 15 04:23:31 1997
+@@ -24,9 +24,6 @@
+ #include "sysdep.h"
+ #include <stdio.h>
+ #include <fcntl.h>
+-#ifndef	NO_SYS_FILE
+-#include <sys/file.h>
+-#endif
+ #include <signal.h>
+ 
+ /* This is needed to include support for TIOCGWINSZ and window resizing. */
+@@ -62,7 +59,6 @@
+    to be visible to readline callers. */
+ 
+ /* Functions imported from other files in the library. */
+-extern char *tgetstr ();
+ extern void rl_prep_terminal (), rl_deprep_terminal ();
+ extern void rl_vi_set_last ();
+ extern Function *rl_function_of_keyseq ();
+@@ -478,7 +474,7 @@
+ void
+ rl_gather_tyi ()
+ {
+-#if defined (MINIMAL)
++#if defined (MINIMAL) && !defined (_WIN32)
+   char input;
+ 
+   if (isatty (0))
+@@ -1153,7 +1149,6 @@
+ _rl_set_screen_size (tty, ignore_env)
+      int tty, ignore_env;
+ {
+-#ifndef MINIMAL
+ #if defined (TIOCGWINSZ) && !defined (TIOCGWINSZ_BROKEN)
+   struct winsize window_size;
+ #endif /* TIOCGWINSZ */
+@@ -1209,7 +1204,6 @@
+      don't use the last column. */
+   if (!term_xn)
+     screenwidth--;
+-#endif
+ }
+ #endif /* !MINIMAL */
+ 
+@@ -1778,7 +1772,7 @@
+   _rl_move_vert (curr_line);
+   _rl_move_cursor_relative (0, the_line);   /* XXX is this right */
+ 
+-#if defined (__WIN32__) || defined (_MSC_VER)
++#if defined (_WIN32)
+   abort();
+ #else
+ #if defined (__GO32__)
+@@ -3119,7 +3113,7 @@
+   int result;
+   unsigned char c;
+ 
+-#if defined (MINIMAL)
++#if defined (MINIMAL) && !defined (_WIN32)
+   if (isatty (0))
+     return (getkey () & 0x7f);
+ #endif /* MINIMAL */
+--- /home/jeff/pilot-tst/src/gdb-4.16/readline/rldefs.h	Tue Oct 31 13:40:46 1995
++++ rldefs.h	Tue Apr 15 04:23:31 1997
+@@ -40,15 +40,28 @@
+ #define HAVE_BSD_SIGNALS
+ /* #define USE_XON_XOFF */
+ 
+-#if defined(__MSDOS__) || defined(_MSC_VER)
++/* Only do this for DOS, and WinGDB */
++#if defined __MSDOS__ || (defined _WIN32 && !defined __CYGWIN32__)
+ #define NO_SYS_FILE
+-#define SIGALRM 1234
+ #undef NEW_TTY_DRIVER
+ #undef HAVE_BSD_SIGNALS
+ #define MINIMAL
+ #endif
+ 
++/* Only do this for cygwin32 */
++#if defined __CYGWIN32__
++#define tgetent(ARG1, ARG2) -1
++#define tgetnum(ARG1) ((int)abort())
++#define tgetstr(ARG1, ARG2) ((char *)abort())
++#define tgetflag(ARG1) ((int)abort())
++#define tputs(ARG1, ARG2, ARG3) ((int)abort())
++#define setpwent()
++#else
++extern char *tgetstr ();
++#endif
++
+ #if defined (__linux__)
++#  include <termios.h>
+ #  include <termcap.h>
+ #endif /* __linux__ */
+ 
+@@ -58,27 +71,26 @@
+ #  undef HAVE_BSD_SIGNALS
+ #endif
+ 
+-#if defined (__WIN32__) && !defined(_MSC_VER)
+-#undef NEW_TTY_DRIVER
+-#define MINIMAL
+-#undef HAVE_BSD_SIGNALS
+-#define TERMIOS_TTY_DRIVER
+-#undef HANDLE_SIGNALS
+-#include <termios.h>
+-/*#define HAVE_POSIX_SIGNALS*/
++/* Only do this for WinGDB */
++#if defined _WIN32 && !defined __CYGWIN32__
++#define ScreenCols() 80
++#define ScreenRows() 24
++#define ScreenSetCursor() abort();
++#define ScreenGetCursor() abort();
+ #endif
+ 
+ /* System V machines use termio. */
+ #if !defined (_POSIX_VERSION)
+-/* CYGNUS LOCAL accept __hpux as well as hpux for HP compiler in ANSI mode.  */
+-#  if defined (USG) || defined (hpux) || defined (__hpux) || defined (Xenix) || defined (sgi) || defined (DGUX)
++/* CYGNUS LOCAL accept __hpux as well as hpux for HP compiler in ANSI mode.
++   Add __osf__ to list of machines to force use of termio.h */
++#  if defined (USG) || defined (hpux) || defined (__hpux) || defined (Xenix) || defined (sgi) || defined (DGUX) || defined (__osf__)
+ #    undef NEW_TTY_DRIVER
+ #    define TERMIO_TTY_DRIVER
+ #    include <termio.h>
+ #    if !defined (TCOON)
+ #      define TCOON 1
+ #    endif
+-#  endif /* USG || hpux || Xenix || sgi || DUGX */
++#  endif /* USG || hpux || Xenix || sgi || DUGX || __osf__ */
+ #endif /* !_POSIX_VERSION */
+ 
+ /* Posix systems use termios and the Posix signal functions. */
+@@ -151,6 +163,12 @@
+ #endif /* !1 */
+ 
+ #if defined (USG) && defined (TIOCGWINSZ) && !defined (Linux)
++#  if defined (_AIX)
++	/* AIX 4.x seems to reference struct uio within a prototype
++	   in stream.h, but doesn't cause the uio include file to
++	   be included.  */
++#    include <sys/uio.h>
++#  endif
+ #  include <sys/stream.h>
+ #  if defined (HAVE_SYS_PTEM_H)
+ #    include <sys/ptem.h>
+@@ -183,7 +201,7 @@
+ /* If on, then readline handles signals in a way that doesn't screw. */
+ #define HANDLE_SIGNALS
+ 
+-#if defined(__WIN32__) || defined(__MSDOS__)
++#if defined __MSDOS__ || (defined _WIN32 && !defined __CYGWIN32__)
+ #undef HANDLE_SIGNALS
+ #endif
+ 
+--- /home/jeff/pilot-tst/src/gdb-4.16/readline/rltty.c	Sat Oct  7 20:44:06 1995
++++ rltty.c	Tue Apr 15 04:23:31 1997
+@@ -24,9 +24,6 @@
+ #include <signal.h>
+ #include <errno.h>
+ #include <stdio.h>
+-#ifndef	NO_SYS_FILE
+-#include <sys/file.h>
+-#endif
+ 
+ #if defined (HAVE_UNISTD_H)
+ #  include <unistd.h>
+--- /home/jeff/pilot-tst/src/gdb-4.16/readline/signals.c	Sat Oct  7 20:44:08 1995
++++ signals.c	Tue Apr 15 04:23:31 1997
+@@ -23,9 +23,6 @@
+ #include <stdio.h>
+ #include <sys/types.h>
+ #include <fcntl.h>
+-#if !defined (NO_SYS_FILE)
+-#  include <sys/file.h>
+-#endif /* !NO_SYS_FILE */
+ #include <signal.h>
+ 
+ /* This is needed to include support for TIOCGWINSZ and window resizing. */
+@@ -152,7 +149,9 @@
+       rl_clear_signals ();
+       rl_pending_input = 0;
+ 
++#ifndef _WIN32
+       kill (getpid (), sig);
++#endif
+ 
+       SIGNALS_UNBLOCK;
+ 
+--- /home/jeff/pilot-tst/src/gdb-4.16/readline/sysdep-norm.h	Wed Nov  4 18:34:54 1992
++++ sysdep-norm.h	Tue Apr 15 04:23:32 1997
+@@ -26,11 +26,17 @@
+ #endif /* USGr4 */
+ #endif /* USG && TIOCGWINSZ */
+ 
++#ifndef _WIN32
+ #include <dirent.h>
+ typedef struct dirent dirent;
++#endif
+ 
+ /* SVR4 systems should use <termios.h> rather than <termio.h>. */
+ 
+ #if defined (USGr4)
+ #define _POSIX_VERSION
++#endif
++
++#if defined _WIN32 && !defined __GNUC__
++#include <malloc.h>
+ #endif
+--- /home/jeff/pilot-tst/src/gdb-4.16/readline/sysdep.h	Wed Nov  4 18:34:54 1992
++++ sysdep.h	Tue Apr 15 04:23:32 1997
+@@ -26,11 +26,17 @@
+ #endif /* USGr4 */
+ #endif /* USG && TIOCGWINSZ */
+ 
++#ifndef _WIN32
+ #include <dirent.h>
+ typedef struct dirent dirent;
++#endif
+ 
+ /* SVR4 systems should use <termios.h> rather than <termio.h>. */
+ 
+ #if defined (USGr4)
+ #define _POSIX_VERSION
++#endif
++
++#if defined _WIN32 && !defined __GNUC__
++#include <malloc.h>
+ #endif
+--- /home/jeff/pilot-tst/src/gdb-4.16/readline/tilde.c	Thu Feb 24 07:19:32 1994
++++ tilde.c	Tue Apr 15 04:23:32 1997
+@@ -27,7 +27,7 @@
+    GDB to add YET ANOTHER -I directive.  No thanks.  */
+ #include "tilde.h"
+ 
+-#ifndef __MSDOS__
++#if !defined(__MSDOS__) && !defined(_WIN32)
+ #include <pwd.h>
+ #endif
+ 
+@@ -218,7 +218,7 @@
+ 	  /* Prepend $HOME to the rest of the string. */
+ 	  char *temp_home = getenv ("HOME");
+ 
+-#ifndef __MSDOS__
++#if !defined (__MSDOS__) && !defined (_WIN32)
+ 	  /* If there is no HOME variable, look up the directory in
+ 	     the password database. */
+ 	  if (!temp_home)
+@@ -242,7 +242,7 @@
+ 	}
+       else
+ 	{
+-#ifndef __MSDOS__
++#if !defined (__MSDOS__) && !defined (_WIN32)
+ 	  struct passwd *user_entry;
+ #endif
+ 	  char *username = (char *)alloca (257);
+@@ -257,7 +257,7 @@
+ 	    }
+ 	  username[i - 1] = '\0';
+ 
+-#ifndef __MSDOS__
++#if !defined (__MSDOS__) && !defined (_WIN32)
+ 	  if (!(user_entry = getpwnam (username)))
+ 	    {
+ #endif
+@@ -281,7 +281,7 @@
+ 		    }
+ 		}
+ 	      /* We shouldn't report errors. */
+-#ifndef __MSDOS__
++#if !defined (__MSDOS__) && !defined (_WIN32)
+ 	    }
+ 	  else
+ 	    {
+@@ -293,7 +293,7 @@
+ 	    return_name:
+ 	      free (dirname);
+ 	      dirname = savestring (temp_name);
+-#ifndef __MSDOS__
++#if !defined (__MSDOS__) && !defined (_WIN32)
+ 	    }
+ 	    endpwent ();
+ #endif
diff -urN gdb-4.16.orig/readline/rldefs.h gdb-4.16/readline/rldefs.h
--- gdb-4.16.orig/readline/rldefs.h	Tue Oct 31 13:40:46 1995
+++ gdb-4.16/readline/rldefs.h	Mon Jul  7 21:08:50 1997
@@ -40,15 +40,28 @@
 #define HAVE_BSD_SIGNALS
 /* #define USE_XON_XOFF */
 
-#if defined(__MSDOS__) || defined(_MSC_VER)
+/* Only do this for DOS, and WinGDB */
+#if defined __MSDOS__ || (defined _WIN32 && !defined __CYGWIN32__)
 #define NO_SYS_FILE
-#define SIGALRM 1234
 #undef NEW_TTY_DRIVER
 #undef HAVE_BSD_SIGNALS
 #define MINIMAL
 #endif
 
+/* Only do this for cygwin32 */
+#if defined __CYGWIN32__
+#define tgetent(ARG1, ARG2) -1
+#define tgetnum(ARG1) ((int)abort())
+#define tgetstr(ARG1, ARG2) ((char *)abort())
+#define tgetflag(ARG1) ((int)abort())
+#define tputs(ARG1, ARG2, ARG3) ((int)abort())
+#define setpwent()
+#else
+extern char *tgetstr ();
+#endif
+
 #if defined (__linux__)
+#  include <termios.h>
 #  include <termcap.h>
 #endif /* __linux__ */
 
@@ -58,27 +71,26 @@
 #  undef HAVE_BSD_SIGNALS
 #endif
 
-#if defined (__WIN32__) && !defined(_MSC_VER)
-#undef NEW_TTY_DRIVER
-#define MINIMAL
-#undef HAVE_BSD_SIGNALS
-#define TERMIOS_TTY_DRIVER
-#undef HANDLE_SIGNALS
-#include <termios.h>
-/*#define HAVE_POSIX_SIGNALS*/
+/* Only do this for WinGDB */
+#if defined _WIN32 && !defined __CYGWIN32__
+#define ScreenCols() 80
+#define ScreenRows() 24
+#define ScreenSetCursor() abort();
+#define ScreenGetCursor() abort();
 #endif
 
 /* System V machines use termio. */
 #if !defined (_POSIX_VERSION)
-/* CYGNUS LOCAL accept __hpux as well as hpux for HP compiler in ANSI mode.  */
-#  if defined (USG) || defined (hpux) || defined (__hpux) || defined (Xenix) || defined (sgi) || defined (DGUX)
+/* CYGNUS LOCAL accept __hpux as well as hpux for HP compiler in ANSI mode.
+   Add __osf__ to list of machines to force use of termio.h */
+#  if defined (USG) || defined (hpux) || defined (__hpux) || defined (Xenix) || defined (sgi) || defined (DGUX) || defined (__osf__)
 #    undef NEW_TTY_DRIVER
 #    define TERMIO_TTY_DRIVER
 #    include <termio.h>
 #    if !defined (TCOON)
 #      define TCOON 1
 #    endif
-#  endif /* USG || hpux || Xenix || sgi || DUGX */
+#  endif /* USG || hpux || Xenix || sgi || DUGX || __osf__ */
 #endif /* !_POSIX_VERSION */
 
 /* Posix systems use termios and the Posix signal functions. */
@@ -151,6 +163,12 @@
 #endif /* !1 */
 
 #if defined (USG) && defined (TIOCGWINSZ) && !defined (Linux)
+#  if defined (_AIX)
+	/* AIX 4.x seems to reference struct uio within a prototype
+	   in stream.h, but doesn't cause the uio include file to
+	   be included.  */
+#    include <sys/uio.h>
+#  endif
 #  include <sys/stream.h>
 #  if defined (HAVE_SYS_PTEM_H)
 #    include <sys/ptem.h>
@@ -183,7 +201,7 @@
 /* If on, then readline handles signals in a way that doesn't screw. */
 #define HANDLE_SIGNALS
 
-#if defined(__WIN32__) || defined(__MSDOS__)
+#if defined __MSDOS__ || (defined _WIN32 && !defined __CYGWIN32__)
 #undef HANDLE_SIGNALS
 #endif
 
diff -urN gdb-4.16.orig/readline/rltty.c gdb-4.16/readline/rltty.c
--- gdb-4.16.orig/readline/rltty.c	Sat Oct  7 20:44:06 1995
+++ gdb-4.16/readline/rltty.c	Mon Jul  7 21:08:50 1997
@@ -24,9 +24,6 @@
 #include <signal.h>
 #include <errno.h>
 #include <stdio.h>
-#ifndef	NO_SYS_FILE
-#include <sys/file.h>
-#endif
 
 #if defined (HAVE_UNISTD_H)
 #  include <unistd.h>
diff -urN gdb-4.16.orig/readline/signals.c gdb-4.16/readline/signals.c
--- gdb-4.16.orig/readline/signals.c	Sat Oct  7 20:44:08 1995
+++ gdb-4.16/readline/signals.c	Mon Jul  7 21:08:50 1997
@@ -23,9 +23,6 @@
 #include <stdio.h>
 #include <sys/types.h>
 #include <fcntl.h>
-#if !defined (NO_SYS_FILE)
-#  include <sys/file.h>
-#endif /* !NO_SYS_FILE */
 #include <signal.h>
 
 /* This is needed to include support for TIOCGWINSZ and window resizing. */
@@ -152,7 +149,9 @@
       rl_clear_signals ();
       rl_pending_input = 0;
 
+#ifndef _WIN32
       kill (getpid (), sig);
+#endif
 
       SIGNALS_UNBLOCK;
 
diff -urN gdb-4.16.orig/readline/sysdep-linux.h gdb-4.16/readline/sysdep-linux.h
--- gdb-4.16.orig/readline/sysdep-linux.h	Wed Dec 31 19:00:00 1969
+++ gdb-4.16/readline/sysdep-linux.h	Mon Jul  7 21:08:50 1997
@@ -0,0 +1,24 @@
+/* System-dependent stuff, for Linux systems.  Known to be good for
+   Linux/Alpha, but should work for all other platforms, too. */
+
+/*
+ * This is important on Linux/Alpha where sizeof(void*) != sizeof(int).
+ */
+#define HAVE_VARARGS_H
+
+#ifdef __GNUC__
+#define alloca __builtin_alloca
+#else
+#if defined (sparc) && defined (sun)
+#include <alloca.h>
+#endif
+#ifndef alloca				/* May be a macro, with args. */
+extern char *alloca ();
+#endif
+#endif
+
+#include <sys/types.h>			/* Needed by dirent.h */
+#include <string.h>
+
+#include <dirent.h>
+typedef struct dirent dirent;
diff -urN gdb-4.16.orig/readline/sysdep-norm.h gdb-4.16/readline/sysdep-norm.h
--- gdb-4.16.orig/readline/sysdep-norm.h	Wed Nov  4 18:34:54 1992
+++ gdb-4.16/readline/sysdep-norm.h	Mon Jul  7 21:08:50 1997
@@ -26,11 +26,17 @@
 #endif /* USGr4 */
 #endif /* USG && TIOCGWINSZ */
 
+#ifndef _WIN32
 #include <dirent.h>
 typedef struct dirent dirent;
+#endif
 
 /* SVR4 systems should use <termios.h> rather than <termio.h>. */
 
 #if defined (USGr4)
 #define _POSIX_VERSION
+#endif
+
+#if defined _WIN32 && !defined __GNUC__
+#include <malloc.h>
 #endif
diff -urN gdb-4.16.orig/readline/tilde.c gdb-4.16/readline/tilde.c
--- gdb-4.16.orig/readline/tilde.c	Thu Feb 24 07:19:32 1994
+++ gdb-4.16/readline/tilde.c	Mon Jul  7 21:08:50 1997
@@ -27,7 +27,7 @@
    GDB to add YET ANOTHER -I directive.  No thanks.  */
 #include "tilde.h"
 
-#ifndef __MSDOS__
+#if !defined(__MSDOS__) && !defined(_WIN32)
 #include <pwd.h>
 #endif
 
@@ -218,7 +218,7 @@
 	  /* Prepend $HOME to the rest of the string. */
 	  char *temp_home = getenv ("HOME");
 
-#ifndef __MSDOS__
+#if !defined (__MSDOS__) && !defined (_WIN32)
 	  /* If there is no HOME variable, look up the directory in
 	     the password database. */
 	  if (!temp_home)
@@ -242,7 +242,7 @@
 	}
       else
 	{
-#ifndef __MSDOS__
+#if !defined (__MSDOS__) && !defined (_WIN32)
 	  struct passwd *user_entry;
 #endif
 	  char *username = (char *)alloca (257);
@@ -257,7 +257,7 @@
 	    }
 	  username[i - 1] = '\0';
 
-#ifndef __MSDOS__
+#if !defined (__MSDOS__) && !defined (_WIN32)
 	  if (!(user_entry = getpwnam (username)))
 	    {
 #endif
@@ -281,7 +281,7 @@
 		    }
 		}
 	      /* We shouldn't report errors. */
-#ifndef __MSDOS__
+#if !defined (__MSDOS__) && !defined (_WIN32)
 	    }
 	  else
 	    {
@@ -293,7 +293,7 @@
 	    return_name:
 	      free (dirname);
 	      dirname = savestring (temp_name);
-#ifndef __MSDOS__
+#if !defined (__MSDOS__) && !defined (_WIN32)
 	    }
 	    endpwent ();
 #endif