Welcome to mirror list, hosted at ThFree Co, Russian Federation.

ChangeLog « cygwin « winsup - cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 0a93ec8beac014b8645c9891be6f40d77ddbf919 (plain)
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
2005-03-02  Christopher Faylor  <cgf@timesys.com>

	* autoload.cc (std_dll_init): Save and restore fpu control register
	around LoadAddress to prevent loaded dlls (like msvcrt.dll) from
	setting unwanted stuff.

2005-03-02  Christopher Faylor  <cgf@timesys.com>

	* cygtls.cc (_cygtls::remove): Don't attempt any removal activities if
	exitsock is zero.

2005-03-02  Christopher Faylor  <cgf@timesys.com>

	* cygtls.cc (_cygtls::init_thread): Move exitsock setting later.  It
	should always be set.
	(_cygtls::remove): Detect zero exitsock.  Not quite sure why this is needed.

2005-03-02  Christopher Faylor  <cgf@timesys.com>

	* autoload.cc (LoadDLLprime): Mask error code to low-order 16 bits.
	(noload): Preserve sign when returning error code.

2005-03-02  Christopher Faylor  <cgf@timesys.com>

	* spawn.cc (do_cleanup): Properly restore SIGINT/SIGQUIT even if they
	had previously been SIG_DFL.

2005-03-01  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_disk_file.cc (fhandler_disk_file::touch_ctime): Replace
	GetSystemTime/SystemTimeToFileTime with GetSystemTimeAsFileTime.
	* times.cc (time_as_timestruc_t): Ditto.
	(time): Ditto.

2005-03-01  Christopher Faylor  <cgf@timesys.com>

	* include/cygwin/version.h: Bump DLL minor number to 14.

2005-03-01  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_clipboard.cc (fhandler_dev_clipboard::write): Never set
	errno to 0.
	(fhandler_dev_clipboard::read): Ditto.
	* fhandler_windows.cc (fhandler_windows::read): Ditto.
	* scandir.cc (scandir): Ditto.
	* syscalls.cc (_fstat64_r): Ditto.
	(_fstat_r): Ditto.
	(_stat64_r): Ditto.
	(_stat_r): Ditto.

	* mmap.cc (mmap64): Fix /dev/zero mapping.

2005-02-28  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler.h (class fhandler_socket): Declare new method
	set_socketpair_eids.
	* fhandler_socket.cc (fhandler_socket::set_socketpair_eids): New method.
	(fhandler_socket::dup): Duplicate sec_pipe if necessary.
	(fhandler_socket::listen): Only create sec_pipe if named pipes are
	available. Initialized sec_peer_pid to 0 as on Linux.
	(fhandler_socket::connect): Only run eid credential transaction if
	named pipes are available.  Fake otherwise. Initialized sec_peer_pid
	to 0 as on Linux.
	(fhandler_socket::accept): Ditto.
	(fhandler_socket::close): Move closing sec_pipe handle from here...
	(fhandler_socket::~fhandler_socket): ... to here.
	* net.cc (socketpair): Set eid credentials by calling
	fhandler_socket::set_socketpair_eids() on both socket ends.
	* wincap.h (wincaps::has_named_pipes): New element.
	* wincap.cc: Implement above element throughout.

2005-02-26  Christopher Faylor  <cgf@timesys.com>

	* sigproc.cc (_pinfo::set_ctty): Move function
	* pinfo.cc (_pinfo::set_ctty): to here.

	* fhandler_mem.cc (fhandler_dev_mem::fstat): Don't fill out structure
	if this is an on-disk device rather than an "auto" device.
	* fhandler_raw.cc (fhandler_dev_raw::fstat): Ditto.

	* path.cc (normalize_posix_path): Don't treat a standalone '//' as
	introducing a UNC path.
	(normalize_win32_path): Ditto.

2005-02-26  Christopher Faylor  <cgf@timesys.com>

	* debug.cc (delete_handle): Report on handle value in debugging output.

	* pinfo.h (_pinfo::exists): Declare "new" function.
	(_pinfo::kill): Ditto.
	* fhandler_termios.cc (tty_min::kill_pgrp): Use _pinfo::exists rather
	than proc_exists.
	* pinfo.cc (pinfo::init): Ditto.  Don't do a low_priority_sleep(0) when
	looping to find exec'ed procinfo.
	(pinfo::release): Be more careful about unmapping and closing.
	* signal.cc (_pinfo::kill): Rename from kill_worker.  Accommodate entry
	into _pinfo class.
	(kill0): Use _pinfo::kill rather than kill_worker.
	(kill_pgrp): Ditto.  Use _pinfo::exists rather than proc_exists.
	* sigproc.cc (_pinfo::exists): Rename from proc_exists.
	(pid_exists): Use _pinfo::exists rather than proc_exists.
	(remove_proc): Ditto.
	* sigproc.h (proc_exists): Delete declaration.

2005-02-25  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler.h (class fhandler_base): Declare fixup_mmap_after_fork
	with additional flags parameter.  Change offset parameter to _off64_t.
	(class fhandler_disk_file): Ditto.
	(class fhandler_dev_mem): Ditto.
	* fhandler_mem.cc (fhandler_dev_mem::fixup_mmap_after_fork):
	Accomodate new parameters.
	* mmap.cc: Include ntdll.h.
	(class mmap_record): Add flags member.
	(mmap_record::mmap_record): Add flags parameter.
	(mmap_record::get_flags): New method.
	(class map): Add next_anon_addr member to store next anonymous mapping
	address suggestion.
	(map::get_next_anon_addr): New method.
	(map::set_next_anon_addr): New method.
	(mmap64): Don't align offset and length to granularity in case of
	MAP_ANONYMOUS on NT.  Check for already existing mapping only on 9x.
	Call mmap_record::mmap_record with additional flags argument.
	(fhandler_base::fixup_mmap_after_fork): Accomodate new parameters.
	(fhandler_disk_file::mmap): Use NtMapViewOfSection with
	AT_ROUND_TO_PAGE flag for anonymous mappings on NT.  If addr is NULL,
	try to map adjacent to previous mapping.
	(fhandler_disk_file::fixup_mmap_after_fork): Add flags argument.
	Change offset parameter to _off64_t.  Use NtMapViewOfSection to
	re-create anonymous mappings on NT.
	(fixup_mmaps_after_fork): Accomodate new parameters when calling
	fhandler's fixup_mmaps_after_fork function.
	* ntdll.h (AT_ROUND_TO_PAGE): New define.

2005-02-25  Corinna Vinschen  <corinna@vinschen.de>

	* mmap.cc (mmap64): Handle anonymous MAP_FIXED request on
	non-granulation boundary.

2005-02-25  Corinna Vinschen  <corinna@vinschen.de>

	* mmap.cc (class mmap_record): Declare new map_pages method with
	address parameter.
	(mmap_record::map_pages): New method with address parameter.
	(mmap64): Evaluate access mode before checking if already existing
	mapping can be used.
	Only use existing mapping if requested access mode matches the one
	in the existing mapping.
	Add check for existing mapping for anonymous MAP_FIXED case.

2005-02-23  Corinna Vinschen  <corinna@vinschen.de>
	
	* localtime.cc: Implement setting __tzrule's offset member using
	newlib's __gettzinfo () interface.
	(__tzrule): Remove.
	(timezone): Define as long according to POSIX.

2005-02-23  Eric Blake  <ebb9@byu.net>

	* devices.in (parsedisk): Fix typo.
	* devices.cc: Regenerate.

2005-02-23  Corinna Vinschen  <corinna@vinschen.de>

	* cygwin.din (getpeereid): Export.
	* fhandler.h (class fhandler_socket): Add pipe and id members to
	exchange eid credentials for AF_LOCAL sockets.
	(eid_pipe_name): Declare new method.
	(getpeereid): Ditto.
	* fhandler_socket.cc (fhandler_socket::eid_pipe_name): New method.
	(fhandler_socket::fhandler_socket): Initialize sec_pipe.
	(fhandler_socket::connect): Exchange eid credentials with accepting
	socket process.
	(fhandler_socket::listen): Prepare eid credential transaction.
	(fhandler_socket::accept): Exchange eid credentials with connecting
	socket process.
	(fhandler_socket::close): Close eid credentials pipe if open.
	(fhandler_socket::getpeereid): New method.
	* net.cc (cygwin_getsockopt): Add SO_PEERCRED handling.
	(getpeereid): New function.
	* include/asm/socket.h (SO_PEERCRED): Define.
	* include/cygwin/socket.h (struct ucred): Define new type.
	* include/cygwin/version.h: Bump API minor version.

2005-02-23  Corinna Vinschen  <corinna@vinschen.de>

	* include/sys/statvfs.h (ST_RDONLY): Define.
	(ST_NOSUID): Define.

2005-02-23  Corinna Vinschen  <corinna@vinschen.de>

	* cygwin.din (fstatvfs): Export.
	(statvfs): Export.
	* syscalls.cc: Include sys/statvfs.h.
	(statvfs): New function.  Move statfs functionality here.
	(fstatvfs): New function.
	(statfs): Just call statvfs and copy structure.  Check validity of
	incoming struct statfs pointer.
	* include/cygwin/types.h (fsblkcnt_t): Define.
	(fsfilcnt_t): Define.
	* include/cygwin/version.h: Bump API minor version.
	* include/sys/statvfs.h: New file.

2005-02-23  Corinna Vinschen  <corinna@vinschen.de>

	* devices.h: Switch FH_ZERO and FH_PORT as on Linux.  Add FH_FULL.
	* devices.in: Add /dev/full.
	* devices.cc: Regenerate.
	* dtable.cc (build_fh_pc): Add FH_FULL.
	* fhandler.cc (fhandler_base::fstat): Set FH_FULL permission bits
	correctly.
	* fhandler_zero.cc (fhandler_dev_zero::write): Set errno to ENOSPC
	and return -1 if device is FH_FULL.

2005-02-22  Christopher Faylor  <cgf@timesys.com>

	* fhandler_disk_file.cc (fhandler_cygdrive::closedir): Return 0 when
	closing cygdrive_root.

2005-02-22  Corinna Vinschen  <corinna@vinschen.de>

	* cygwin.din (basename): Export.
	(dirname): Export.
	* path.cc (basename): New function.
	(dirname): New function.
	* include/libgen.h: New file.
	* include/cygwin/version.h: Bump API minor version.

2005-02-22  Corinna Vinschen  <corinna@vinschen.de>

	* select.cc (peek_pipe): Disable new pipe code until there's
	a working substitute.

2005-02-22  Corinna Vinschen  <corinna@vinschen.de>

	* cygwin.din (fdatasync): Export.
	* fhandler.cc (fhandler_base::fsync): Return with EINVAL if no
	handle is available.
	* syscalls.cc (fdatasync): Create export alias to fsync.
	* include/cygwin/version.h: Bump API minor version.

2005-02-20  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler.h (fhandler_base::fstat_helper): Declare with additional
	dwVolumeSerialNumber argument.  Drop default values for last three
	arguments.
	* fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Pass
	dwVolumeSerialNumber from GetFileInformationByHandle to fstat_helper.
	(fhandler_base::fstat_by_name): Pass pc.volser () to fstat_helper.
	Accomodate dropping default values for last three arguments of
	fstat_helper.
	(fhandler_base::fstat_helper): Add dwVolumeSerialNumber argument.
	Use for st_dev member unless 0 in which case pc.volser () is used.

2005-02-20  Corinna Vinschen  <corinna@vinschen.de>

	* autoload.cc (FindFirstVolumeA): Add.
	(FindNextVolumeA): Add.
	(FindVolumeClose): Add.
	(GetVolumePathNamesForVolumeNameA): Add.
	* fhandler.h (class fhandler_base): Declare new method fsync.
	* fhandler.cc (fhandler_base::fsync): New method.
	* syscalls.cc (fsync): Move functionality into fhandler method fsync.
	Just call this method from here.
	(sync_worker): New static function.
	(sync): Fill with life for NT systems.
	* wincap.h (wincaps::has_guid_volumes): New element.
	* wincap.cc: Implement above element throughout.

2005-02-20  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler.h (enum query_state): Add query_write_attributes state.
	(fhandler_base::status.query_open): Add a bit to make room for more
	states.
	(class fhandler_base): Declare new method utimes.
	(class fhandler_socket): Ditto.
	(class fhandler_disk_file): Ditto.
	(fhandler_disk_file::fhandler_disk_file): Add constructor with
	path_conv parameter.
	* fhandler.cc (fhandler_base::open): Add query_write_attributes
	handling.
	(fhandler_base::utimes): New method.
	* fhandler_disk_file.cc (fhandler_disk_file::link): Simplify.
	Open file with query_write_attributes instead of query_write_control.
	(fhandler_disk_file::utimes): New method.
	(fhandler_disk_file::fhandler_disk_file): Add constructor with
	path_conv parameter setting pc member immediately.
	* fhandler_socket.cc (fhandler_socket::fchmod): Use new
	fhandler_disk_file constructor.
	(fhandler_socket::fchown): Ditto.
	(fhandler_socket::facl): Ditto.
	(fhandler_socket::link): Ditto.
	(fhandler_socket::utimes): New method.
	* times.cc: Include dtable.h.
	(timeval_to_filetime): Make non-static.
	(utimes): Move functionality into fhandler method utimes. Just call
	this method from here.
	* winsup.h: Simplify declarations of time helper functions.
	(timeval_to_filetime): Add extern declaration.

2005-02-19  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler.h (class fhandler_base): Declare new method link.
	(class fhandler_socket): Ditto.
	(class fhandler_disk_file): Ditto.
	* fhandler.cc (fhandler_base::open): Add FILE_WRITE_ATTRIBUTES
	to query_write_control access flags.
	(fhandler_base::link): New method.
	* fhandler_disk_file.cc (fhandler_disk_file::fchmod): Don't try to
	open with O_WRONLY since query_write_control includes
	FILE_WRITE_ATTRIBUTES.
	(fhandler_disk_file::fchown): Ditto.
	(fhandler_disk_file::facl): Ditto.
	(fhandler_disk_file::link): New method.  Touch st_ctime on successful
	link.
	* fhandler_socket.cc (fhandler_socket::link): New method.
	* syscalls.cc (link): Move functionality into fhandler method link.
	Just call this method from here.

2005-02-19  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler.h (class fhandler_socket): Declare new methods fchown,
	fchmod and facl.
	* fhandler_socket.cc (fhandler_socket::fstat): Handle AF_LOCAL
	sockets.
	(fhandler_socket::fchmod): New method.
	(fhandler_socket::fchown): New method.
	(fhandler_socket::facl): New method.

2005-02-19  Corinna Vinschen  <corinna@vinschen.de>

	* localtime.cc: Temporary implementation of setting __tzrule's offset
	member to be used by strftime.
	(__tzrule): New global variable.
	(tzparse): Set __tzrule's offset member appropriately.

2005-02-17  Christopher Faylor  <cgf@timesys.com>

	* path.cc (path_conv::check): Set fs flag when a unix-domain socket
	is detected.

2005-02-17  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_disk_file.cc (fhandler_disk_file::fstat): Set st_ctime if
	has_changed flag is set.
	(fhandler_disk_file::touch_ctime): Reset has_changed flag on success.

2005-02-17  Corinna Vinschen  <corinna@vinschen.de>

	* times.cc (utimes): Open files with FILE_WRITE_ATTRIBUTES first,
	if that fails, try opeing with GENERIC_WRITE.  Fix comments.

2005-02-15  Christopher Faylor  <cgf@timesys.com>

	* path.h (path_conv::issocket): Return true if device == FH_UNIX rather
	than expecting path_conv to set a flag.

2005-02-11  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler.cc (fhandler_base::raw_write): Mark as changed on
	successful write.
	* fhandler.h (fhandler_base::status_flags): Add 'has_changed' flag.
	* fhandler_disk_file.cc (fhandler_disk_file::fchmod): Call
	fhandler_disk_file's own open and close instead of open_fs and
	close_fs.  Mark as changed on success.
	(fhandler_disk_file::fchown): Ditto.
	(fhandler_disk_file::facl): Ditto.
	(fhandler_disk_file::ftruncate): Ditto.
	(fhandler_base::open_fs): Mark as changed when O_TRUNC flag on existing
	file is set.
	(fhandler_disk_file::close): Set st_ctime if has_changed flag is set.

2005-02-11  Christopher Faylor  <cgf@timesys.com>

	* cygthread.cc (cygthread::release): Reset ev here if it exists.
	(cygthread::terminate_thread): Eliminate racy code which reset ev and
	thread_sync.  Remove a few nonsensical inuse checks.  Exit at the
	bottom.
	(cygthread::detach): Rewrite to again try to ensure that we don't say
	we're signalled when we are not signalled.
	* fhandler.cc (fhandler_base::raw_read): Revert to signalling read
	success quickly.
	* pipe.cc (fhandler_pipe::close): Use base method to close handle.
	* sigproc.h (WAIT_SIG_PRIORITY): Just trundle along at normal priority
	to allow the pipe thread to do its thing if possible.

	* pinfo.h (pinfo::zap_cwd): Declare new function.
	(pinfo::zap_cwd): Move 'cd out of the way code' here.
	(pinfo::exit): Use it here.
	* spawn.cc (spawn_guts): And here.

2005-02-11  Corinna Vinschen  <corinna@vinschen.de>

	* times.cc (utimes): Open files with GENERIC_WRITE on file systems
	not supporting ACLs.

2005-02-09  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_disk_file.cc (fhandler_disk_file::ftruncate): Fix checking
	lseek return code.

2005-02-08  Corinna Vinschen  <corinna@vinschen.de>

	* times.cc (timeval_to_filetime): Define first parameter const.
	(utimes): Define second parameter to const according to SUSv3.
	(utime): Ditto.
	* include/sys/utime.h (utime) : Change declaration accordingly.

2005-02-08  Corinna Vinschen  <corinna@vinschen.de>

	* cygthread.cc (cygthread::detach): Just test thread handle after
	signal arrived, don't wait infinitely for it.

2005-02-08  Christopher Faylor  <cgf@timesys.com>

	* pipe.cc (fhandler_pipe::read): Remove hold over from old read_state
	implementation.

2005-02-06  Yitzchak Scott-Thoennes <sthoenna@efn.org>

	* net.cc (cygwin_gethostbyname): Be more picky about what's a numeric
	address string, and use tls in that case too.

2005-02-07  Christopher Faylor  <cgf@timesys.com>

	* exceptions.cc: Make windows_system_directory non-static.
	* pinfo.cc (pinfo::exit): Change innocuous cd'ed location to one that
	is more likely to exist.

2005-02-06  Corinna Vinschen  <corinna@vinschen.de>

	* path.cc (path_conv::check): Leave symlink expansion loop in case
	a not-ENOENT error happens.

	* cygheap.h (cygheap_fdmanip::fhandler_pipe *): New cast operator.
	* pinfo.cc (_pinfo::commune_recv): Add PICOM_PIPE_FHANDLER handling.
	(_pinfo::commune_send): Ditto.
	(_pinfo::pipe_fhandler): New method.
	* pinfo.h (enum picom): Add PICOM_PIPE_FHANDLER.
	(_pinfo::pipe_fhandler): Declare.
	* pipe.cc (fhandler_pipe::open): Rewrite.  Allow to open foreign
	pipe handles.

2005-02-03  Christopher Faylor  <cgf@timesys.com>

	* cygthread.h (cygthread::terminate_thread): Reflect return value.
	* cygthread.cc (cygthread::detach): Be more careful about ensuring that
	sigwait is properly waited for to avoid later missynchronization.
	(cygthread::terminate_thread): Return true if thread was actually
	terminated and all handles were closed.
	* fhandler_base.cc (fhandler_base::raw_read): Use signal_read_state
	rather than raw calls to win32 api.
	(fhandler_base::read): Ditto.
	* fhandler.h (fhandler_pipe::fixup_after_exec): Use method to create
	read_state signalling.
	(fhandler_pipe::create): Ditto.

	* Makefile.in: Make some more files -fomit-frame-pointer.

2005-02-02  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler.h (fhandler_base::ftruncate): Define new virtual method.
	(fhandler_disk_file::ftruncate): Ditto.
	* fhandler.cc (fhandler_base::ftruncate): New method.
	* fhandler_disk_file.cc (fhandler_disk_file::ftruncate): Ditto.
	* syscalls.cc (ftruncate64): Move functionality into fhandlers.
	Call fhandler method from here.

2005-02-02  Corinna Vinschen  <corinna@vinschen.de>

	* pipe.cc (fhandler_pipe::dup): Fix conditionals in case of error.

2005-02-02  Corinna Vinschen  <corinna@vinschen.de>

	* times.cc (utimes): Mark st_ctime for update according to SUSv3.

2005-02-01  Christopher Faylor  <cgf@timesys.com>

	* fhandler_proc.cc (format_proc_partitions): Remove PartitionType check
	since it could skip over partitions that are actually interesting.

2005-02-01  Christopher Faylor  <cgf@timesys.com>

	* cygthread.cc (cygthread::terminate_thread): Wait briefly for
	notification event in the event that the thread was actually in the
	process of exiting.

	* pipe.cc (fhandler_pipe::dup): read_state is not supposed to be
	inheritable.  Fix that.

	* path.cc (path_conv::check): Set symlen = 0 to avoid a compiler
	warning.

	* devices.h (devices::parsedisk): Declare new function.
	* devices.in (devices::parsedisk): Define new function.
	* dtable.cc (dtable::init_std_file_from_handle): Use device numbers
	rather than name.
	* fhandler_proc.cc (format_proc_partitions): Use parsedisk to generate
	disk names from numeric codes.  (This was broken on two of my
	systems previously and is still broken now)

2005-02-01  Corinna Vinschen  <corinna@vinschen.de>

	* pipe.cc (fhandler_pipe::open):  Allow re-opening of /proc/<pid>/fd
	pipes of the current process.

2005-02-01  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler.cc (fhandler_base::get_proc_fd_name): Don't generate
	"device:" entry.
	* fhandler.h (fhandler_socket::open): New method.
	(fhandler_pipe::open): New method.
	* fhandler_proc.cc (fhandler_proc::exists): Return -2 in case of
	/proc/self.
	* fhandler_process.cc (fhandler_process::exists): Return -2 in
	case of symlinks, -3 for pipes and -4 for sockets.
	(fhandler_process::fstat): Handle pipes and sockets.
	(fhandler_process::open): Handle opening /proc/<pid>/fd.
	(fhandler_process::fill_filebuf): Generate empty names for
	non exisiting file descriptors.
	* fhandler_socket.cc (fhandler_socket::get_proc_fd_name): Always
	generate "socket:[number]" strings as on Linux.
	(fhandler_socket::open): New method.
	(fhandler_socket::fstat): Always return socket type.
	* path.cc (symlink_info::set): Remove unused second parameter.
	(path_conv::check): Handle pipes and sockets in /proc.
	Set correct device type for AF_LOCAL sockets.
	* pinfo.cc (_pinfo::commune_recv): Generate empty names for
	non exisiting file descriptors.
	(_pinfo::fd): Ditto.
	* pipe.cc (fhandler_pipe::open): New method.

2005-01-31  Christopher Faylor  <cgf@timesys.com>

	* path.h (path_conv::set_name): Declare new function.
	* path.cc (path_conv::set_name): Define new function.
	* fhandler.h (fhandler_dev_null::open): Declare new function.
	* fhandler.cc (fhandler_dev_null::open): Define new function.

2005-01-31  Christopher Faylor  <cgf@timesys.com>

	* smallprint.c (rnarg): Use long rather than unsigned long so that we
	get proper sign extension.

2005-01-31  Corinna Vinschen  <corinna@vinschen.de>

	* environ.cc (set_traverse): New function.
	(parse_thing): Add "traverse" option.  Sort options alphabetically.
	(environ_init): On NT, switch on traverse checking by default.

2005-01-31  Christopher Faylor  <cgf@timesys.com>

	* smallprint.c (__rn): Regparmize.

2005-01-31  Christopher Faylor  <cgf@timesys.com>

	* smallprint.c (rnarg): New macro.
	(rnargLL): Ditto.
	(__rn): Rename from 'rn', add a mask argument, and use the mask
	argument to control how many significant digits to care about.
	(__small_vsprintf): Use __rn, rnarg, rnargLL, as appropriate.

2005-01-31  Christopher Faylor  <cgf@timesys.com>

	* pinfo.cc (pinfo::exit): Only return low-order 16 bits when exiting.

2005-01-31  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_process.cc (format_process_maps): Get destbuf argument by
	reference.  Allow resizing of destbuf as necessary.  Fix string
	handling.

2005-01-31  Corinna Vinschen  <corinna@vinschen.de>

	* cygheap.h (class cygheap_fdenum): New class to enumerate used
	fhandlers.
	* dtable.h (class dtable): Add cygheap_fdenum as friend class.
	* fhandler.h (fhandler_base::get_proc_fd_name): New virtual method
	to return a name for /proc/<pid>/fd.
	(fhandler_socket::get_proc_fd_name): Ditto.
	(fhandler_pipe::get_proc_fd_name): Ditto.
	(fhandler_virtual::opendir): Make virtual method.
	(fhandler_process::opendir): New method.
	* fhandler.cc (fhandler_base::get_proc_fd_name): New method.
	* fhandler_process.cc: Include ctype.h.
	(PROCESS_FD): Define.
	(process_listing): Add "fd".
	(fhandler_process::exists): Fix comment.  Return 1 in case of "fd"
	directory. Handle files below "fd".
	(fhandler_process::fstat): Drop "self" handling.  Set correct link
	count for directories.
	(fhandler_process::opendir): New method to handle "fd" directory.
	(fhandler_process::readdir): Add "fd" handling.
	(fhandler_process::open): Drop "self" handling.
	(fhandler_process::fill_filebuf): Ditto.  Add "fd" handling.  Fix
	"maps" output string.
	* fhandler_registry.cc (fhandler_registry::fstat): Set correct link
	count for directories.
	* fhandler_socket.cc (fhandler_socket::get_proc_fd_name): New method.
	* path.cc (symlink_info::set): Fix thinko.
	* pinfo.cc (_pinfo::commune_recv): Rename pathbuf to path throughout.
	Drop local path variable in PICOM_FIFO case.  Fix debug output.
	Close handles as early as possible. Add PICOM_FDS and PICOM_FD
	handling.
	(_pinfo::commune_send): Add PICOM_FDS and PICOM_FD handling.
	(_pinfo::fd): New method.
	(_pinfo::fds): New method.
	* pinfo.h (enum picom): Add PICOM_FDS and PICOM_FD.
	(_pinfo::fd): Declare.
	(_pinfo::fds): Declare.
	* pipe.cc (fhandler_pipe::get_proc_fd_name): New method.

2005-01-29  Corinna Vinschen  <corinna@vinschen.de>

	* smallprint.c (rn): Change uval to unsigned long long to fix 64 bit
	handling.
	* fhandler_process.cc (format_process_maps): Print major, minor and
	inode numbers correctly.

2005-01-29  Corinna Vinschen  <corinna@vinschen.de>

	* autoload.cc (GetModuleFileNameExA): Add.
	(GetModuleInformation): Add.
	(QueryWorkingSet): Add.
	* fhandler.h (fhandler_virtual::get_filebuf): New method.
	* fhandler_proc.cc (PROC_SELF): Define.
	(proc_fhandlers): Change type of self to FH_PROC.
	(fhandler_proc::exists): Return -3 if self.
	(fhandler_proc::fstat): Handle self as symlink.
	(fhandler_proc::fill_filebuf): Handle self.
	* fhandler_process.cc: Include psapi.h.
	(PROCESS_EXENAME): Remove.
	(PROCESS_MAPS): Define.
	(PROCESS_ROOT): Define.
	(PROCESS_EXE): Define.
	(PROCESS_CWD): Define.
	(process_listing): Remove "exename", add "maps, "root", "exe" and
	"cwd" elements.
	(fhandler_process::exists): Return -2 for symlinks.
	(fhandler_process::fstat): Handle symlinks.
	(fill_filebuf): Evaluate pid if pid is 0.  Use exename handling for
	exe.  Handle maps, root and cwd.
	(format_process_maps): New function evaluating "maps".
	* path.cc (symlink_info::set): New method to fill symlink_info
	with data matching virtual symlinks.
	(path_conv::check): Handle virtual symlinks.
	* pinfo.cc (_pinfo::commune_recv): Add PICOM_CWD and PICOM_ROOT
	handling.
	(_pinfo::commune_send): Ditto.
	(_pinfo::root): New function.
	(_pinfo::cwd): New function.
	* pinfo.h (enum picom): Add PICOM_CWD and PICOM_ROOT.
	(_pinfo::root): Declare.
	(_pinfo::cwd): Declare.

2005-01-29  Christopher Faylor  <cgf@timesys.com>

	* cygthread.cc (new): Add a little more debugging.
	* thread.cc (pthread_null::exit): Add a _my_tls.remove() for safety.

2005-01-28  Christopher Faylor  <cgf@timesys.com>

	* cygtls.cc (cygtls::call2): Move socket cleanup.
	(cygtls::remove): Move socket cleanup here.  Don't use _my_tls to
	reference it.

2005-01-26  Christopher Faylor  <cgf@timesys.com>

	* pinfo.cc (pinfo::init): Avoid a compiler warning.

2005-01-25  Corinna Vinschen  <corinna@vinschen.de>

	* syscalls.cc (setpriority): Implement PRIO_PGRP, PRIO_USER and
	setting priority in other Cygwin processes.
	(getpriority): Implement PRIO_PGRP, PRIO_USER and getting nice value
	from other processes.

2005-01-26  Pierre Humblet <pierre.humblet@ieee.org>

	* path.cc (path_conv::check): Return ENOTDIR rather than ENOENT
	when a component is not a directory. Remove unreachable code.
	(digits): Delete.

2005-01-25  Christopher Faylor  <cgf@timesys.com>

	* pinfo.h (pinfo::init): Make third parameter non-optional and
	propagate change throughout.
	* pinfo.cc (set_myself): Pass INVALID_HANDLE_POINTER if h is NULL.
	(pinfo::init): Make third parameter non-optional.  Eliminate use of
	PID_EXECED as an argument.  Put setting of handle back inside loop but
	reorganize to try to open it only when necessary.

2005-01-25  Corinna Vinschen  <corinna@vinschen.de>

	* cygwin.din: Export getpriority and setpriority.
	* fork.cc (fork_parent): Copy parent's nice value into child.
	* spawn.cc (spawn_guts): Ditto.
	* miscfuncs.cc (winprio_to_nice): New function.
	(nice_to_winprio): Ditto.
	* pinfo.cc (pinfo_init): If parent is not a Cygwin process, set
	default nice value according to current Win32 priority class.
	* pinfo.h (class _pinfo): Add nice member.
	* syscalls.cc (setpriority): New function, only implementing
	PRIO_PROCESS for now.
	(getpriority): Ditto.
	(nice): Just call setpriority.
	* wincap.h (wincaps::has_extended_priority_class): New element.
	* wincap.cc: Implement above element throughout.
	* winsup.h: Add prototypes for winprio_to_nice and nice_to_winprio.
	* include/limits.h (NZERO): New define.
	* include/cygwin/types.h (id_t): New datatype.
	* include/cygwin/version.h: Bump API minor version.
	* include/sys/resource.h: Add PRIO_XXX defines and prototypes for
	getpriority and setpriority.

2005-01-25  Corinna Vinschen  <corinna@vinschen.de>

	* path.cc (realpath): Allow to expand with .exe suffix.

2005-01-22  Christopher Faylor  <cgf@timesys.com>

	* spawn.cc (spawn_guts): Perform same "cd" as in pinfo::exit below to
	make sure that a stub process does not keep the current working
	directory busy after the "execed" process has exited.

2005-01-22  Christopher Faylor  <cgf@timesys.com>

	* pinfo.cc (pinfo::init): Move everything but the MapViewOfFileEx out
	of the loop since trying multiple times to call CreateFileMapping
	doesn't make much sense.  Try to structure the loop a little better so
	that exiting with a break does the right thing.
	(pinfo::release): Release shared memory area if it exists and close
	handle if it exists.

2005-01-22  Christopher Faylor  <cgf@timesys.com>

	* pinfo.cc (pinfo::maybe_set_exit_code_from_windows): Make sure that
	process has exited before getting an error code.
	(pinfo::exit): "cd" to innocuous location before exiting to make sure
	that process does not keep the current working directory busy while it
	is in the process of really exiting.

2005-01-18  Corinna Vinschen  <corinna@vinschen.de>

	* autoload.cc (CoInitialize): Remove.
	(CoUninitialize): Remove.
	(CoCreateInstance): Remove.
	(CoTaskMemFree): Add.
	(SHGetDesktopFolder): Add.
	* path.cc (shortcut_header): Remove.
	(shortcut_initalized): Remove.
	(GUID_shortcut): New static GUID.
	(struct win_shortcut_hdr): New struct describing Windows shortcut
	header structure.
	(symlink_worker): Rewrite creating Windows shortcuts.  Create
	ITEMIDLIST if target exists.  Only write once.
	(cmp_shortcut_header): Use win_shortcut_hdr structure for comparison.
	(check_shortcut): Rewrite to read only once from file.  Allow skipping
	an ITIMIDLIST in the file.

2005-01-16  Christopher Faylor  <cgf@timesys.com>

	* pinfo.h (maybe_set_exit_code_from_windows): Renamed from
	set_exit_state.
	* pinfo.cc (pinfo::exit): Use renamed function.
	(proc_waiter): Ditto.  Make a copy of input argument to avoid problems
	when procs array is shuffled.  Flag when copy is made so that
	remove_proc knows when it is safe to reshuffle.
	* sigproc.cc (proc_terminate): Don't flag process_state as PID_EXITED.
	(remove_proc): Wait for waiter to finish copying pinfo element before
	moving it (an actual wait should be an extremely rare event).

2005-01-15  Christopher Faylor  <cgf@timesys.com>

	* init.cc (dll_entry): Remove unused extern.

	* include/sys/cygwin.h: Remove PID_ZOMBIE.
	* pinfo.h: Rename EXITCODE_* defines.
	(pinfo::set_exit_state): Remove parameter.
	* pinfo.cc (set_exit_state): Remove parameter.  Reverse sense of test
	so that exitcode is checked for having been set rather than not having
	been set.  Set flag when exitcode has been established.  Don't set
	PID_STATE here.
	(pinfo::init): Remove exitcode initialization.
	(pinfo::exit): Reflect change in EXITCODE_* naming.  Set flag when
	exitcode has been established.  Reflect change in arguments to
	set_process_state.
	(proc_waiter): Reflect change in arguments to set_process_state.  Set
	process_state here and only here.
	* fhandler_process.cc (fhandler_process::fill_filebuf): Reflect removal
	of PID_ZOMBIE define.
	(format_process_stat): Ditto.
	(format_process_status): Ditto.
	* sigproc.cc (pid_exists): Ditto.
	(stopped_or_terminated): Ditto.  Make sure that only low-order 16 bits of
	exitcode are used.
	* spawn.cc (spawn_guts): Reflect change in EXITCODE_* naming.

2005-01-15  Christopher Faylor  <cgf@timesys.com>

	* sigproc.cc (sig_send): Don't complain if attempt to send signal to
	myself fails after I've "execed".

2005-01-14  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_disk_file.cc (fhandler_disk_file::facl): Pretend successful
	SETACL if no acls are available.
	* fhandler.cc (fhandler_base::facl): Implement to return sensible
	values on GETACL and GETACLCNT.  Pretend successful SETACL.
	* fhandler_virtual.cc (fhandler_virtual::facl): Ditto.

2005-01-13  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler.h (fhandler_disk_file::touch_ctime): Declare.
	* fhandler_disk_file.cc (fhandler_disk_file::touch_ctime): New method
	to set file's ctime.
	(fhandler_disk_file::fchmod): Try opening file for writing first.
	Set file's ctime on success.
	(fhandler_disk_file::fchown): Ditto.
	(fhandler_disk_file::facl): Ditto.

2005-01-13  Corinna Vinschen  <corinna@vinschen.de>

	* pinfo.cc (pinfo::exit): Don't access self after releasing it.
	* path.h (path_conv::path_conv): Fill path with native device
	name in case of device argument.

2005-01-13  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_serial.cc (fhandler_serial::dup): Call overlapped_setup
	for child, not for parent.

2005-01-13  Christopher Faylor  <cgf@timesys.com>

	* init.cc (dll_entry): Nuke attempt to set exit code since parent will
	use windows exit code if needed.
	* pinfo.cc (pinfo::exit): Move release() here to minimize pid creation
	race (suggested by Pierre Humblet).

2005-01-12  Christopher Faylor  <cgf@timesys.com>

	Reorganize header file inclusion throughout so that cygerrno.h comes
	first.
	* fhandler.h (select_record::thread_errno): Save any encountered errno
	here.
	(select_record::set_select_errno): New function.
	(select_record::saw_error): New function.
	(select_record::select_record): Initialize thread_errno to zero.
	* select.cc (set_handle_or_return_if_not_open): Set thread_errno on
	failure.
	(select_stuff::wait): Record errno for later resurrection in calling
	thread.
	(peek_serial): Ditto.

2005-01-12  Christopher Faylor  <cgf@timesys.com>

	* syscalls.cc (system): Use "/bin/sh" as per linux and (sorta) SUSv3.

2005-01-12  Christopher Faylor  <cgf@timesys.com>

	* pinfo.cc (pinfo::exit): Don't assume that this == myself.

2005-01-11  Christopher Faylor  <cgf@timesys.com>

	* pinfo.cc (pinfo::init): Don't close input handle on temporary (?)
	failure.

2005-01-11  Christopher Faylor  <cgf@timesys.com>

	* pinfo.h (_pinfo::set_exit_state): Declare new function.
	(pinfo::exit): Move here from _pinfo::exit.
	* sigproc.cc (child_info::sync): Use new function to set exitcode and
	process_state.
	* pinfo.cc (_pinfo::exit): Ditto.
	(proc_waiter): Ditto.
	(_pinfo::set_exit_state): Define new function.
	(_pinfo::dup_proc_pipe): Close handle when there is no parent process
	around to care about the exit value.
	* dcrt0.cc (dll_crt0_0): Move subproc_ready synchronization later to
	make sure that myself is still mapped in parent.
	(do_exit): Reflect movement to pinfo::exit.
	(__api_fatal): Ditto.
	* exceptions.cc (signal_exit): Ditto.
	* errno.cc (errmap): Map PROC_NOT_FOUND.
	* init.cc (dll_entry): Release myself before exiting.
	* sigproc.cc (proc_can_be_signalled): Set errno appropriately.
	(sig_send): Ditto.  Also remove ill-advised test for !myself->sendsig
	since this is an indication of a process which is still initializating
	-- it is not an error.
	(child_info::sync): Don't set exitcode here.  Assume that will happen
	in proc_waiter, if necessary.
	* spawn.cc (spawn_guts): Delay "wait_for_myself" logic until later.
	Don't wait at all if the process has already exited.  Reflect movement
	to pinfo::exit.

2005-01-11  Corinna Vinschen  <corinna@vinschen.de>

	* environ.cc (build_env): Disallow empty strings and strings starting
	with '=' in Win32 environment.

2005-01-08  Pierre Humblet <pierre.humblet@ieee.org>

	* syscalls.cc (seteuid32): Only change the default dacl when
	seteuid succeeds. Do not close HKCU.

2005-01-06  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_process.cc: Use strcasematch instead of strcasecmp
	throughout.

2005-01-06  Corinna Vinschen  <corinna@vinschen.de>

	* syscalls.cc (rename): Fix behaviour in case of renaming directories
	according to SUSv3.

2005-01-06  Corinna Vinschen  <corinna@vinschen.de>

	* fhandler_disk_file.cc (fhandler_base::open_fs): Don't allow
	opening directories for writing.

2005-01-06  Christopher Faylor  <cgf@timesys.com>

	* timer.cc (timer_thread): Pass sigev pointer value as per SuSv3 rather
	than pointer to sigev.

2005-01-05  Christopher Faylor  <cgf@timesys.com>

	* dcrt0.cc (multiple_cygwin_problem): Reorganize error message to not
	always talk about a "version" when it's not a version.
	(dll_crt0_0): Change info passed to multiple_cygwin_problem to be a
	little more precise.
	* shared.cc (user_shared_initialize): Ditto.
	(shared_info::initialize): Ditto.

2005-01-03  Christopher Faylor  <cgf@timesys.com>

	* pinfo.cc (_pinfo::dup_proc_pipe): Can't close proc pipe when execing
	or we will suffer an exit code race.

2005-01-03  Corinna Vinschen  <corinna@vinschen.de>

	* signal.cc (abort): Call _GLOBAL_REENT's __cleanup.

2005-01-03  Corinna Vinschen  <corinna@vinschen.de>

	* syscalls.cc (setmode): Call _fwalk with _GLOBAL_REENT.

2005-01-01  Christopher Faylor  <cgf@timesys.com>

	* cygthread.cc (cygthread::stub): Set inuse to false when exiting.
	(cygthread::cygthread): Actually pass name as argument to debugging
	output to avoid SEGV when strace'ing.
	(cygthread::release): Don't set stack_ptr to NULL, since it is only set
	once on first entry to a stub not on each stub iteration.
	(cygthead::exit_thread): Remove obsolete function.
	* cygthread.h (cygthread::exit_thread): Ditto.

2005-01-01  Christopher Faylor  <cgf@timesys.com>

	* shared.cc (open_shared): Don't attempt VirtualAlloc magic if first
	attempt to map memory fails.