OSDN Git Service

* mount.cc (fs_info::update): Revert to open filesystem with access set
[pf3gnuchains/pf3gnuchains3x.git] / winsup / cygwin / ChangeLog
1 2009-07-23  Corinna Vinschen  <corinna@vinschen.de>
2
3         * mount.cc (fs_info::update): Revert to open filesystem with access set
4         to READ_CONTROL.  If that fails, try additionally with FILE_READ_DATA.
5
6 2009-07-22  Eric Blake  <ebb9@byu.net>
7
8         * exceptions.cc (handle_exceptions): Set si_addr according to
9         POSIX for SIGSEGV.
10
11 2009-07-22  Corinna Vinschen  <corinna@vinschen.de>
12
13         * mount.cc (fs_info::update): Open filesystem with access set to 0.
14         Explain why.
15
16 2009-07-22  Corinna Vinschen  <corinna@vinschen.de>
17
18         * mount.cc: Revert accidental checkin.
19
20 2009-07-22  Corinna Vinschen  <corinna@vinschen.de>
21
22         * path.cc (symlink_info::check): Handle STATUS_NOT_SUPPORTED from
23         NtCreateFile just like STATUS_EAS_NOT_SUPPORTED.
24
25 2009-07-22  Corinna Vinschen  <corinna@vinschen.de>
26
27         * mount.cc (fillout_mntent): Fix typo (noexec -> notexec).
28
29 2009-07-22  Corinna Vinschen  <corinna@vinschen.de>
30
31         * path.cc (symlink_info::check): Fix typo in comment.
32
33 2009-07-22  Corinna Vinschen  <corinna@vinschen.de>
34
35         * fhandler.h (enum del_lock_called_from): New enumeration.
36         (fhandler_base::del_my_locks): Declare taking a del_lock_called_from
37         as argument.
38         * fhandler.cc (fhandler_base::close): Call del_my_locks with "on_close".
39         (fhandler_base::fixup_after_fork): Call del_my_locks with "after_fork".
40         (fhandler_base::fixup_after_exec): Call del_my_locks with "after_exec".
41         * flock.cc (fhandler_base::del_my_locks): Take del_lock_called_from
42         as argument.  Call node->del_my_locks with NULL handle in after_exec
43         case.  Explain why.
44
45 2009-07-21  Eric Blake  <ebb9@byu.net>
46
47         * dtable.cc (dup2): Correct return value for no-op.
48
49 2009-07-21  Corinna Vinschen  <corinna@vinschen.de>
50             Eric Blake  <ebb9@byu.net>
51
52         * fhandler_disk_file.cc (fhandler_disk_file::fchmod): Add special case
53         for MVFS.  Explain why.
54         (fhandler_disk_file::utimens): Drop local variables lastaccess and
55         lastwrite.  Copy timestamps right into FILE_BASIC_INFORMATION structure
56         to avoid copying them twice.
57
58 2009-07-20  Corinna Vinschen  <corinna@vinschen.de>
59
60         * wincap.h (wincaps::has_always_all_codepages): New element.
61         * wincap.cc: Implement above element throughout.
62         * wchar.h (__sjis_mbtowc): Declare.
63         (__eucjp_mbtowc): Ditto.
64         (__gbk_mbtowc): Ditto.
65         (__kr_mbtowc): Ditto.
66         (__big5_mbtowc): Ditto.
67         * syscalls.cc (internal_setlocale): Convert to char * function.
68         Return parameter by default.  Return NULL if request to use a
69         charset can't be satisfied due to missing codepage support in the
70         underlying OS.  Fix comment.
71         (setlocale): Store original locale.  Restore to original locale if
72         internal_setlocale returns NULL.
73
74 2009-07-20  Corinna Vinschen  <corinna@vinschen.de>
75
76         * fork.cc (fork): Create local tmp_pathbuf.  Explain why.
77
78 2009-07-18  Christopher Faylor  <me+cygwin@cgf.cx>
79
80         * exceptions.cc (sig_handle_tty_stop): Set stopsig to SIGCONT when
81         continuing.
82         (stopped_or_terminated): Honor WCONTINUED.
83         * wait.cc (wait4): Ditto.
84         * include/cygwin/wait.h (WCONTINUED): Define.
85         (__W_CONTINUED): Ditto.
86         (WIFCONTINUED): Ditto.
87
88 2009-07-18  Dave Korn  <dave.korn.cygwin@gmail.com>
89
90         * libstdcxx_wrapper.cc (operator delete): Remove stray space in
91         asm name.
92
93 2009-07-17  Christopher Faylor  <me+cygwin@cgf.cx>
94
95         * cygtls.cc (_cygtls::init_exception_handler): Test for e, not e->prev
96         or we could still end up adding our handler twice.  Add comment
97         explaining what we're doing.
98         * dll_init.cc (dll_dllcrt0_1): Clarify comment.
99
100 2009-07-17  Christopher Faylor  <me+cygwin@cgf.cx>
101
102         * cygtls.cc (_cygtls::init_exception_handler): Avoid adding our
103         exception handler twice.
104
105 2009-07-17  Corinna Vinschen  <corinna@vinschen.de>
106
107         * syscalls.cc (unlink_nt): Just return when a sharing violation
108         occurs on remote filesystems.
109
110 2009-07-17  Corinna Vinschen  <corinna@vinschen.de>
111
112         * globals.cc: Improve comment on R/O UNICODE_STRINGs.
113         * mount.h (class fs_info): Add is_mvfs bit.
114         * mount.cc (fs_info::update): Recognize MVFS remote filesystem.
115         (fillout_mntent): Reorder filesystem checks for speed.  Add
116         mvfs, unixfs, and sunwnfs filesystem types.
117         * path.h (class path_conv): Add fs_is_mvfs method.
118         * path.cc (symlink_worker): On MVFS, always create symlinks as
119         Windows shortcuts.  Explain why.
120
121 2009-07-16  Corinna Vinschen  <corinna@vinschen.de>
122
123         * syscalls.cc (unlink_nt): First remove the R/O DOS attribute with
124         FILE_WRITE_ATTRIBUTES access only, then re-open the file for DELETE.
125         Explain why.
126
127 2009-07-16  Corinna Vinschen  <corinna@vinschen.de>
128
129         * fhandler_disk_file.cc (fhandler_disk_file::fchmod): Remove file
130         attribute check already done in NtSetAttributesFile.
131
132 2009-07-15  Corinna Vinschen  <corinna@vinschen.de>
133
134         * globals.cc: Reorder constant UNICODE_STRINGs for clarity.
135         * mount.h (fs_info::sttaus): Move filesystem type flags into
136         substructure.  Add union to allow simple test for having set any
137         one filesystem type flag.  Replace has_buggy_open flag with is_sunwnfs
138         flag.  Replace has_buggy_fileid_dirinfo with is_unixfs flag.
139         (fs_info::got_fs): New private method.
140         (fs_info::has_buggy_open): New explicit implementation.
141         (fs_info::has_buggy_fileid_dirinfo): Ditto.
142         * mount.cc (fs_info::update): Optimize filesystem checks for speed.
143         * winsup.h (IMPLEMENT_STATUS_FLAG): Change write accessor to return
144         value just set.
145
146 2009-07-15  Corinna Vinschen  <corinna@vinschen.de>
147
148         * fhandler_netdrive.cc (GET_RESOURCE_INFO): Remove.
149         (thread_netdrive): Drop GET_RESOURCE_INFO case.
150         (fhandler_netdrive::exists): Use GET_RESOURCE_OPENENUM info class
151         to check for existance.
152
153 2009-07-15  Corinna Vinschen  <corinna@vinschen.de>
154
155         * fhandler_netdrive.cc (fhandler_netdrive::readdir): Remove useless
156         alloca.
157
158 2009-07-15  Corinna Vinschen  <corinna@vinschen.de>
159
160         * path.cc (cwdstuff::set): Only fix up UNC path in win32 so as not
161         to overwrite incoming path.
162
163 2009-07-14  Corinna Vinschen  <corinna@vinschen.de>
164
165         Throughout avoid having to initialize constant UNICODE_STRINGs.
166         * globals.cc: Define constant UNICODE_STRINGs and store in .rdata
167         section.
168         * fhandler_disk_file.cc: Throughout, use readonly UNICODE_STRINGs
169         rather then initializing local UNICODE_STRING variable where
170         applicable.
171         * fhandler_mem.cc (fhandler_dev_mem::open): Ditto.
172         * flock.cc (inode_t::inode_t): Ditto.
173         * mmap.cc: Ditto.
174         * syscalls.cc: Ditto.
175         * mount.cc (fs_info::update): Ditto.
176         * path.cc: Ditto.
177
178         * ntdll.h (RtlEqualUnicodePathPrefix): Redefine to take prefix as
179         UNICODE_STRING.
180         (RtlEqualUnicodePathSuffix): Redefine to take suffix as UNICODE_STRING.
181         * fhandler_disk_file.cc: Accommodate throughout.
182         * mount.cc (fs_info::update): Ditto.
183         * path.cc (cwdstuff::set): Ditto.
184         * syscalls.cc: Ditto.
185
186 2009-07-14  Corinna Vinschen  <corinna@vinschen.de>
187
188         * globals.cc (active_codepage): Remove.
189
190 2009-07-12  Christopher Faylor  <me+cygwin@cgf.cx>
191
192         * how-spawn-works.txt: Add "out of date" note.
193         * how-vfork-works.txt: Ditto.
194
195 2009-07-12  Christopher Faylor  <me+cygwin@cgf.cx>
196
197         * Makefile.in: Don't do anything special with any RCS directories.
198
199         * ntdll.h (PROCESSINFOCLASS): Remove unneeded trailing comma.
200
201         * pinfo.cc (_pinfo::dup_proc_pipe): Remove unneeded assignment.
202
203         * sigproc.cc (sig_send): Don't send signal to myself if this is an exec
204         stub.
205
206 2009-07-12  Corinna Vinschen  <corinna@vinschen.de>
207
208         * fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Don't use
209         FileAllInformation info class since it needs a big buffer.  Add a
210         comment.
211
212 2009-07-07  Dave Korn  <dave.korn.cygwin@gmail.com>
213
214         * winbase.h (ilockexch): Avoid making 'ret' volatile.
215         (ilockcmpexch): Likewise.
216
217 2009-07-07  Dave Korn  <dave.korn.cygwin@gmail.com>
218
219         * Makefile.in (DLL_OFILES): Add libstdcxx_wrapper.o
220         (libstdcxx_wrapper_CFLAGS): Add flags for new module.
221         (_cygwin_crt0_common_STDINCFLAGS): Define per-file override.
222         (libstdcxx_wrapper_STDINCFLAGS, cxx_STDINCFLAGS): Likewise.
223         * cxx.cc: Include "cygwin-cxx.h".
224         (operator new): Tweak prototype for full standards compliance.
225         (operator new[]): Likewise.
226         (operator new (nothrow)): New fallback function.
227         (operator new[] (nothrow), operator delete (nothrow),
228         operator delete[] (nothrow)): Likewise.
229         (default_cygwin_cxx_malloc): New struct of pointers to the above,
230         for final last-resort fallback default.
231         * cygwin-cxx.h: New file.
232         (struct per_process_cxx_malloc): Define.
233         (default_cygwin_cxx_malloc): Declare extern.
234         * cygwin.din (__wrap__ZdaPv): Export new wrapper.
235         (__wrap__ZdaPvRKSt9nothrow_t, __wrap__ZdlPv,
236         __wrap__ZdlPvRKSt9nothrow_t, __wrap__Znaj,
237         __wrap__ZnajRKSt9nothrow_t, __wrap__Znwj,
238         __wrap__ZnwjRKSt9nothrow_t): Likewise.
239         * globals.cc (__cygwin_user_data): Init newly-repurposed 'forkee'
240         field (now 'cxx_malloc') to point to default_cygwin_cxx_malloc.
241         * libstdcxx_wrapper.cc: New file.
242         (__wrap__ZdaPv, __wrap__ZdaPvRKSt9nothrow_t, __wrap__ZdlPv,
243         __wrap__ZdlPvRKSt9nothrow_t, __wrap__Znaj,
244         __wrap__ZnajRKSt9nothrow_t, __wrap__Znwj,
245         __wrap__ZnwjRKSt9nothrow_t): Define wrapper functions for libstdc++
246         malloc operators and their overrides.
247         * winsup.h (default_cygwin_cxx_malloc): Declare extern.
248         * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
249         * include/sys/cygwin.h (struct per_process_cxx_malloc): Forward
250         declare here.
251         (struct per_process::forkee): Rename and repurpose from this ...
252         (struct per_process::cxx_malloc): ... to this.
253         * lib/_cygwin_crt0_common.cc: Include cygwin-cxx.h.
254         (WEAK): Define shorthand helper macro.
255         (__cygwin_cxx_malloc): Define and populate with weak references
256         to whatever libstdc++ malloc operators will be visible at final
257         link time for Cygwin apps and dlls.
258         (_cygwin_crt0_common): Always look up cygwin DLL's internal
259         per_process data, and don't test for (impossible) failure.  Inherit
260         any members of __cygwin_cxx_malloc that we don't have overrides
261         for from the DLL's default and store the resulting overall set of
262         overrides back into the DLL's global per_process data.
263
264 2009-07-07  Corinna Vinschen  <corinna@vinschen.de>
265
266         * cygtls.cc (_cygtls::remove): Fix typo.
267
268 2009-07-06  Christopher Faylor  <me+cygwin@cgf.cx>
269
270         * Makefile.in (clean): Clean generated files in srcdir.
271         * tlsoffsets.h: Regenerate.
272
273 2009-07-06  Christopher Faylor  <me+cygwin@cgf.cx>
274
275         * cygtls.cc (_cygtls::remove): Avoid closing a NULL handle.
276
277 2009-07-06  Corinna Vinschen  <corinna@vinschen.de>
278
279         * fhandler_socket.cc (fhandler_socket::recv_internal): Convert wsabuf
280         and wsacnt to references.  Fix handling of WSAEMSGSIZE.
281
282 2009-07-06  Corinna Vinschen  <corinna@vinschen.de>
283
284         * cygtls.h (struct _local_storage): Add thread storage pointers for
285         memory used by socket select functions.  Combine them into a single
286         struct select.
287         * cygtls.cc: Accommodate above change throughout.
288         (_cygtls::init_thread): Drop initalizing of sockevt to
289         INVALID_HANDLE_VALUE.
290         (_cygtls::fixup_after_fork): Reset sockevt to NULL.
291         (_cygtls::remove): Don't use sockevt value to bail out prematurely.
292         Set sockevt to NULL.  Free malloced select members.
293         * select.h (struct select_socket_info): Drop max_w4 member.
294         * select.cc (thread_socket): Use INFINITE timeout value if number of
295         objects to wait for is <= MAXIMUM_WAIT_OBJECTS.  Use num_w4 member
296         of select_socket_info struct rather than dropped max_w4.
297         (init_tls_select_info): New inline function to initialize TLS select
298         members.
299         (start_thread_socket): Just call init_tls_select_info to initialize TLS
300         select members and use them later on.
301         (socket_cleanup): Don't free select_socket_info pointer members since
302         they are thread local now.
303
304 2009-07-06  Christopher Faylor  <me+cygwin@cgf.cx>
305
306         * dtable.cc (handle_to_fn): Detect failing NtQueryObject.
307
308 2009-07-06  Corinna Vinschen  <corinna@vinschen.de>
309
310         * autoload.cc: Delete stray CR.
311
312 2009-07-05  Christopher Faylor  <me+cygwin@cgf.cx>
313
314         * fhandler_console.cc: Change workstation -> windows station
315         throughout.
316
317 2009-07-04  Christopher Faylor  <me+cygwin@cgf.cx>
318
319         * autoload.cc (SetParent): Add new import.
320         * fhandler.h (fhandler_console::create_invisible_console): Declare new
321         function.
322         (create_invisible_console_workaround): Ditto.
323         * fhandler_console.cc (fhandler_console::create_invisible_console):
324         Define new function.
325         (create_invisible_console_workaround): Ditto.  Add too much code to
326         deal with broken Windows 7.  Use a helper app to start an invisible
327         console window.
328         (fhandler_console::need_invisible): Reorganize to use helper functions
329         to create invisible console.
330
331         * spawn.cc (spawn_guts): Avoid zeroing already zeroed fields in si.
332
333 2009-07-04  Dave Korn  <dave.korn.cygwin@gmail.com>
334
335         * autoload.cc (AttachConsole): Correct size of args.
336
337 2009-07-03  Christopher Faylor  <me+cygwin@cgf.cx>
338
339         * dcrt0.cc (jit_debug): New global.
340         (initial_env): Set jit_debug when we are automatically starting a gdb
341         process.
342         * dtable.cc (dtable::get_debugger_info): Don't tty tricks when we are
343         being debugged by our own captive gdb, as determined by jit_debug ==
344         true.
345         (dtable::init_std_file_from_handle): Detect errors when initializing a
346         tty early rather than at random points later.
347         * fhandler.h (fhandler_*::init): Return int to indicate
348         success/failure.
349         * fhandler.cc (fhandler_base::init): Reflect change in return value.
350         * pipe.cc (fhandler_pipe::init): Ditto.
351         (fhandler_pipe::create_selectable): Don't say we're retrying when we
352         aren't.
353         * fhandler_console.cc (fhandler_console::init): Ditto.  Return
354         success/failure.
355         * fhandler_serial.cc (fhandler_serial::init): Ditto.
356         * fhandler_tty.cc (fhandler_tty_slave::init): Ditto.
357         (fhandler_tty_slave::open): Make debugging output more detailed.
358         * tty.cc (tty_list::terminate): Don't close I/O handles before all
359         slaves have checked in.
360         (tty::slave_alive): Make a non-inlined function.  Check if tty pipe
361         handles can be created as an additional exists check.
362         * tty.h (tty::slave_alive): Just define here.
363
364 2009-07-03  Corinna Vinschen  <corinna@vinschen.de>
365
366         * posix.sgml: Add fpurge and mkstemps to BSD list.
367
368 2009-07-03  Eric Blake  <ebb9@byu.net>
369
370         * cygwin.din (fpurge, mkstemps): New exports.
371         * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
372         * mktemp.cc (_gettemp): Add parameter.
373         (mkstemps): New function.
374         (mkstemp, mkdtemp, mktemp): Adjust clients.
375
376 2009-07-03  Corinna Vinschen  <corinna@vinschen.de>
377
378         * autoload.cc: Fix typo in comment.
379         (ShowWindowAsync): Define.
380         (AttachConsole): Define.
381         * fhandler_console.cc (fhandler_console::need_invisible): Add band-aid
382         for Windows 7 AllocConsole bug.
383
384 2009-07-01  Corinna Vinschen  <corinna@vinschen.de>
385
386         * net.cc (get_xp_ifs): Fix typo in comment.
387
388 2009-07-01  Corinna Vinschen  <corinna@vinschen.de>
389
390         * fhandler.h (class fhandler_socket): Add class members and methods
391         to store and retrieve the SO_RCVBUF and SO_SNDBUF sizes.
392         * fhandler_socket.cc (fhandler_socket::dup): Duplicate new members.
393         (fhandler_socket::send_internal): Check for SO_SNDBUF size and
394         restrict send to 1 byte less per KB 823764.  Leave loop immediately
395         if WSASendMsg has been used.
396         * net.cc (fdsock): Change comment again.  Set buffer sizes to 65536.
397         Store values in fhandler_socket.
398         (cygwin_setsockopt): Store SO_RCVBUF and SO_SNDBUF sizes in
399         fhandler_socket.
400         (cygwin_sendto): Drop call to sig_dispatch_pending.
401         (cygwin_recvfrom): Ditto.
402         (cygwin_recvmsg): Ditto.
403         (cygwin_sendmsg): Ditto.
404
405 2009-06-30  Christopher Faylor  <me+cygwin@cgf.cx>
406
407         * select.h: New file split from fhandler.h.
408         (select_record::select_record): Define do-nothing constructor for "new"
409         to avoid gratuitous zeroing.
410         (select_info): New base class.
411         (select_pipe_info): New class with methods for dealing with pipes.
412         (select_socket_info): New class with methods for dealing with sockets.
413         (select_serial_info): Dummy class for serial.
414         (select_mailslot_info): Dummy class for mailslots.
415         (select_stuff): Define device_specific_* as actual classes rather than
416         void *.
417         * dtable.h (dtable::select_read): Accommodate return value change to
418         'bool' and argument change to "select_stuff".
419         (dtable::select_write): Ditto.
420         (dtable::select_except): Ditto.
421         * dtable.cc (dtable::select_read): Accommodate return value change to
422         'bool' and argument change to "select_stuff".
423         (dtable::select_write): Ditto.
424         (dtable::select_except): Ditto.
425         * fhandler.h: Excise select-related classes.
426         (fhandler_*::select_read): Change argument to select_stuff.
427         (fhandler_*::select_write): Ditto.
428         (fhandler_*::select_except): Ditto.
429         * select.cc (UNIX_FD_ZERO): Use memset rather than bzero.
430         (select_stuff::test_and_set): Change return type to bool.  Allocate
431         select_record on entry and let fhandler_*::select_* operate on the
432         start.next field of select_stuff.
433         (pipeinf): Delete.
434         (select_pipe_info::select_pipe_info): New constructor.  Allocates event
435         for controlling pipe waits.
436         (select_pipe_info::~select_pipe_info): New destructor.  Destroy event.
437         Stop thread.
438         (select_pipe_info::add_watch_handle): New function.
439         (thread_pipe): Wait for the hEvent part of any overlapped pipes before
440         peeking.
441         (start_thread_pipe): Don't allocate device_specific_pipe stuff here.
442         Assume that it has been allocated earlier.
443         (pipe_cleanup): Rely on select_pipe_info destructor to clean up pipe
444         paraphenalia.
445         (fhandler_*::select_*): Derive select_record from new select_stuff
446         argument.
447         (fhandler_pipe::select_*): Ditto.  Allocate pipe-specific field if not
448         already allocated.
449         (serialinf): Delete.
450         (thread_serial): serialinf -> select_serial_info.
451         (fhandler_base::ready_for_read): Rewrite to accommodate change in
452         argument to fhandler_*::select_*.
453         (socketinf): Delete.
454         (thread_socket): socketinf -> select_socket_info.
455         (mailslotinf): Delete.
456         (thread_mailslot): mailslotinf -> select_mailslot_info.
457
458 2009-06-30  Christopher Faylor  <me+cygwin@cgf.cx>
459
460         * fhandler.cc (fhandler_base::has_ongoing_io): Accept an argument
461         indicating whether the overlapped event should be tested.
462         (fhandler_base::read_overlapped): Pass is_overlapped state to
463         has_ongoing_io.
464         (fhandler_base::write_overlapped): Ditto.
465         * fhandler.h (fhandler_base::has_ongoing_io): Accommodate argument
466         change.
467         * select.cc (peek_pipe): Ditto.
468
469 2009-06-30  Corinna Vinschen  <corinna@vinschen.de>
470
471         * net.cc (fdsock): Set default socket buffer sizes to 65520.  Change
472         comment accordingly.
473         * fhandler_socket.cc (fhandler_socket::send_internal): Set maximum
474         send size to 65520 as well.
475
476 2009-06-29  Christopher Faylor  <me+cygwin@cgf.cx>
477
478         * select.cc (peek_pipe): Turn on (temporarily?) the experimental code
479         which tries to determine when a pipe is writable.
480
481 2009-06-28  Christopher Faylor  <me+cygwin@cgf.cx>
482
483         * select.cc (peek_pipe): Use has_ongoing_io() to determine if the pipe
484         is ready for writing rather than performing brute-force checks.
485
486 2009-06-28  Christopher Faylor  <me+cygwin@cgf.cx>
487
488         * fhandler.h (fhandler_base::has_ongoing_io): Declare new function.
489         * fhandler.cc (fhandler_base::has_ongoing_io): Define new function.
490         (fhandler_base::read_overlapped): Use has_ongoing_io to avoid writing
491         when handle has not completed last I/O.
492         (fhandler_base::write_overlapped): Ditto.
493         * select.cc (peek_pipe): Be more careful about accessing hEvent field
494         from get_overlapped().
495
496 2009-06-28  Christopher Faylor  <me+cygwin@cgf.cx>
497
498         * gendef (cleanup): Rename from 'nocr'.  Remove comments and trailing
499         spaces.
500         * cygwin.din: Add long-needed comment describing what
501         dll_crt0__FP11per_process demangles to.
502
503         * select.cc (peek_pipe): Flag handle as not ready for write if event is
504         not signalled.
505         * fhandler.cc (fhandler_base::setup_overlapped): Establish event as
506         already signalled.
507         (fhandler_base::wait_overlapped): Don't reset event after we've
508         successfully waited.  MSDN documentation says that this happens
509         automatically after a WriteFileEx/ReadFileEx.
510
511 2009-06-26  Corinna Vinschen  <corinna@vinschen.de>
512
513         * wincap.h (wincaps::has_broken_alloc_console): New element.
514         * wincap.cc: Implement above element throughout.
515
516 2009-06-25  Corinna Vinschen  <corinna@vinschen.de>
517
518         * sec_auth.cc (lsaauth): Close unused handle.
519         (lsaprivkeyauth): Ditto.
520
521 2009-06-23  Corinna Vinschen  <corinna@vinschen.de>
522
523         * sec_auth.cc (get_server_groups): Ignore errors from
524         get_user_local_groups.
525
526 2009-06-22  Corinna Vinschen  <corinna@vinschen.de>
527
528         * spawn.cc (spawn_guts): Don't run additional check for Win32
529         incompatible CWD if newargv.fixup bailed out already.
530         (av::fixup): Check shell scripts for executability.
531
532 2009-06-18  Corinna Vinschen  <corinna@vinschen.de>
533
534         * path.cc (chdir): Check error conditions first.
535
536 2009-06-17  Corinna Vinschen  <corinna@vinschen.de>
537
538         * fhandler_socket.cc (fhandler_socket::recv_internal): Mark WSARecvMsg
539         as NO_COPY.
540
541 2009-06-16  Christopher Faylor  <me+cygwin@cgf.cx>
542
543         * fhandler.cc (fhandler_base::read_overlapped): Use a better variable
544         name.
545
546 2009-06-16  Christopher Faylor  <me+cygwin@cgf.cx>
547
548         * fhandler.cc (fhandler_base::read_overlapped): Preserve len when
549         looping due to received signal.
550
551 2009-06-15  Corinna Vinschen  <corinna@vinschen.de>
552
553         * net.cc (get_flags): New static function to generate interface flags
554         value.
555         (get_ipv4fromreg_ipcnt): New static function to fetch number of
556         configured IPv4 addresses for a given NIC from registry.
557         (get_ipv4fromreg): New static function to fetch configured IPv4
558         addresses for a given NIC from registry.
559         (get_friendlyname): New static function to generate friendly name.
560         (get_hwaddr): New static function to copy hardware address.
561         (get_xp_ifs): Restructure slightly.  Add code to generate IPv4 entries
562         entries for interfaces which are disconnected.
563
564 2009-06-14  Christopher Faylor  <me+cygwin@cgf.cx>
565
566         * errno.cc (errmap): Add mapping for ERROR_IO_INCOMPLETE.
567         * fhandler.cc (fhandler_base::fcntl): Fix comment.
568         (fhandler_base::wait_overlapped): Accept an optional len parameter.
569         Use the len parameter when WriteFile fails with ERROR_IO_PENDING.  Make
570         debug output less alarming.
571         (fhandler_base::write_overlapped): Pass len to wait_overlapped.
572         * fhandler.h (fhandler_base::wait_overlapped): Add an optional argument
573         denoting the number of characters intended to be written.
574
575         * fhandler_tty.cc (fhandler_pty_master::close): Don't close archetype
576         handles when cygwin is still initializing since the handles aren't
577         actually opened at that point.
578
579 2009-06-14  Corinna Vinschen  <corinna@vinschen.de>
580
581         * localtime.cc (time2): Take another stab at fixing a compiler warning.
582
583 2009-06-14  Christopher Faylor  <me+cygwin@cgf.cx>
584
585         * localtime.cc (time2): Take a stab at fixing a compiler warning.
586
587 2009-06-14  Christopher Faylor  <me+cygwin@cgf.cx>
588
589         * fhandler.cc (fhandler_base::wait_overlapped): Honor nonblocking flag
590         for writes.  Don't reset event handle when we see a ERROR_IO_PENDING.
591
592         * sigproc.cc (stopped_or_terminated): Use bool constants for
593         consistency.
594
595         * wait.cc (wait4): Remove nonsensical comment.
596
597 2009-06-13  Corinna Vinschen  <corinna@vinschen.de>
598
599         * fhandler_socket.cc (fhandler_socket::recv_internal): Set namelen
600         pointer to NULL if name pointer is NULL.  Explain why.
601
602 2009-06-12  Corinna Vinschen  <corinna@vinschen.de>
603
604         * localtime.cc (time2): Change "spring gap" to "spring forward gap"
605         in comment.
606
607 2009-06-12  Corinna Vinschen  <corinna@vinschen.de>
608
609         * localtime.cc (time2): Add workaround for spring forward gap problem.
610         Add explaining comment.
611
612 2009-06-12  Corinna Vinschen  <corinna@vinschen.de>
613
614         * Makefile.in (SUBLIBS): Add librt.a.
615         (librt.a): New rule to build librt.a.
616
617 2009-06-12  Corinna Vinschen  <corinna@vinschen.de>
618
619         * posix_ipc.cc (check_path): Fix typo in comment.  Align naming
620         convention rules to Linux.  Handle backslash same as slash.  Add
621         comment.
622
623 2009-06-09  Corinna Vinschen  <corinna@vinschen.de>
624
625         * autoload.cc (GetSystemTimes): Remove.
626         * fhandler_proc.cc (format_proc_uptime): Use global system_info rather
627         than retrieving a local copy of the SYSTEM_INFO.  Drop call to
628         GetSystemTimes and retrieve SystemPerformanceInformation on all systems
629         again with buffer size big enough for 64 bit systems.
630         (format_proc_stat): Use global system_info rather than retrieving a
631         local copy of the SYSTEM_INFO.  Retrieve SystemPerformanceInformation
632         with buffer size big enough for 64 bit systems.
633
634 2009-06-08  Corinna Vinschen  <corinna@vinschen.de>
635
636         * autoload.cc (GetSystemTimes): Define.
637         * fhandler_proc.cc (format_proc_uptime): Use GetSystemInfo to retrieve
638         processor count.  Use GetSystemTimes when available to retrieve system
639         idle time.  Improve debug output.
640         (format_proc_stat): Use GetSystemInfo to retrieve processor
641         count.  Improve debug output.  Ignore if SystemPerformanceInformation
642         returns error.  Explain why.
643
644 2009-06-08  Corinna Vinschen  <corinna@vinschen.de>
645
646         * fork.cc (frok::parent): Remove ancient code erroneously flushing
647         stdout.
648
649 2009-06-08  Corinna Vinschen  <corinna@vinschen.de>
650
651         * cygerrno.h (save_errno::~save_errno): Set errno directly to avoid
652         flooding debug output.
653
654 2009-06-08  Corinna Vinschen  <corinna@vinschen.de>
655
656         * path.cc (symlink_info::check): Return with error set to ENOENT if
657         STATUS_NO_MEDIA_IN_DEVICE is returned.
658
659 2009-06-07  Christopher Faylor  <me+cygwin@cgf.cx>
660
661         * cygheap.h (mini_cygheap): New struct.
662         (init_cygheap): Inherit locale field via mini_cygheap.
663         * cygheap.cc (cygheap_at_start): Define new variable.
664         (cygheap): Initialize as cygheap_at_start so that locale information is
665         always available.
666         (cygheap_init): Initialize cygheap iff it is set to cygheap_at_start.
667         * shared_info.h (memory_init): Accommodate argument change.
668         * memory.cc (memory_init): Accept an argument indicating whether
669         cygheap should be initialized or not.
670         * dcrt0.cc (child_info_fork::handle_fork): Pass false to memory_init().
671         (child_info_spawn::handle_spawn): Ditto.
672         (dll_crt0_0): Pass true to memory_init when not forking or execing.
673
674         * cygheap.h (cygheap_types::HEAP_2_DLL): New enum.
675         * dll_init.h (dll): Remove unused namelen field.
676         (dll_list::load_after_fork): Accommodate change in arguments.
677         * dll_init.cc (dll_list::alloc): Allocate dll information in the cygwin
678         heap.
679         (dll_list::detach): Free dll information from the cygwin heap.
680         (dll_list::load_after_fork): Use dll information in the cygwin heap
681         directly rather than querying parent.
682         * fork.cc (frok::first_dll): Delete.
683         (frok::child): Don't report on first_dll.  Don't pass it to
684         load_on_fork.
685         (frok::parent): Don't set first_dll.
686         (fork): Ditto.
687
688 2009-06-06  Corinna Vinschen  <corinna@vinschen.de>
689
690         * dll_init.cc (dll_list::alloc): Allocate memory using a section
691         object.  Explain why.  Drop call to GetSystemInfo, rather call
692         getpagesize to get allocation granularity.  Only align to allocation
693         granularity under WOW64.  Use roundup2 to align.
694         (dll_list::detach): Call NtUnmapViewOfSection instead of VirtualFree.
695
696 2009-06-06  Corinna Vinschen  <corinna@vinschen.de>
697
698         * mmap.cc: Use NtUnmapViewOfSection instead of UnmapViewOfFile
699         throughout for symmetry.
700         (fhandler_dev_mem::munmap): Use correct process handle in call to
701         NtUnmapViewOfSection.
702
703 2009-06-06  Corinna Vinschen  <corinna@vinschen.de>
704
705         * dll_init.h (struct dll): Set size of name element to ANYSIZE_ARRAY.
706         * dll_init.cc: Fix formatting.
707         (dll_list::alloc): Only allocate as much memory for struct dll as
708         necessary for given DLL name.
709         (dll_list::load_after_fork): Only read a single page of parent memory.
710         Only read more if namelen indicates that it's necessary.
711
712 2009-06-05  Dave Korn  <dave.korn.cygwin@gmail.com>
713
714         * winbase.h (ilockexch): Fix asm constraints.
715         (ilockcmpexch): Likewise.
716
717 2009-06-05  Corinna Vinschen  <corinna@vinschen.de>
718
719         * heap.cc (heap_init): Fix typo in comment.
720
721 2009-06-04  Corinna Vinschen  <corinna@vinschen.de>
722
723         * fhandler_clipboard.cc: Avoid calling system_printf.
724         (set_clipboard): Add basic error checking.  Set errno here.  Per MSDN,
725         don't call GlobalFree on data block transferred to clipboard.
726         (fhandler_dev_clipboard::write): Drop setting errno after call to
727         set_clipboard.
728         (fhandler_dev_clipboard::read): Add basic error checking. Simplify code.
729
730 2009-06-04  Corinna Vinschen  <corinna@vinschen.de>
731
732         * fhandler_console.cc (set_console_title): Convert title string to
733         wchar_t and call SetConsoleTitleW.
734
735 2009-06-04  Corinna Vinschen  <corinna@vinschen.de>
736
737         * fhandler_console.cc (fhandler_console::read): Allow Ctrl-Space to
738         emit a NUL byte.
739
740 2009-06-04  Dave Korn  <dave.korn.cygwin@gmail.com>
741
742         * thread.cc (__cygwin_lock_lock): Delete racy optimisation.
743         (__cygwin_lock_unlock): Likewise.
744
745 2009-06-03  IWAMURO Motnori  <deenheart@gmail.com>
746
747         * strfuncs.cc (sys_cp_mbstowcs): Fix condition.
748
749 2009-06-03  Corinna Vinschen  <corinna@vinschen.de>
750
751         * strfuncs.cc (sys_cp_wcstombs): Implement reverse functionality
752         of the change to sys_cp_mbstowcs from 2009-05-30.
753         (sys_cp_mbstowcs): Slightly reformat.  Fix comment to accommodate
754         change to sys_cp_wcstombs.  Don't write to *ptr if dst is NULL.
755
756 2009-06-03  Corinna Vinschen  <corinna@vinschen.de>
757
758         * fhandler_console.cc (fhandler_console::read): Convert Alt-Backspace
759         to \033\177 or to \377 dependent on the setting of dev_state->metabit.
760
761 2009-06-02  Corinna Vinschen  <corinna@vinschen.de>
762
763         * path.cc (path_conv::check): Don't call set_exec for files on "noacl"
764         mount points.
765
766 2009-05-30  Christopher Faylor  <me+cygwin@cgf.cx>
767
768         * strfuncs.cc (sys_cp_mbstowcs): Treat src as unsigned char *.  Convert
769         failure of f_mbtowc into a single malformed utf-16 value.
770
771 2009-05-30  Christopher Faylor  <me+cygwin@cgf.cx>
772
773         * cygwin/include/sys/termios.h: Make default erase character "^?".
774
775 2009-05-30  Christopher Faylor  <me+cygwin@cgf.cx>
776
777         * fhandler_console.cc (fhandler_console::read): Convert backspace key
778         to DEL.
779
780 2009-05-29  Christopher Faylor  <me+cygwin@cgf.cx>
781
782         * path.cc (cwdstuff::set): Rewrite previous change to properly test the
783         end of the buffer.
784
785 2009-05-28  Christopher Faylor  <me+cygwin@cgf.cx>
786
787         * path.cc (cwdstuff::set): Avoid removing a nonexistent trailing slash.
788
789 2009-05-20  Eric Blake  <ebb9@byu.net>
790
791         * net.cc (gethostby_helper): Use correct signedness.
792
793 2009-05-18  Christopher Faylor  <me+cygwin@cgf.cx>
794
795         * mount.cc (mount_info::add_item): Avoid using any-old '/' as
796         indicating root.
797
798 2009-05-18  Christopher Faylor  <me+cygwin@cgf.cx>
799
800         * mount.cc (mount_info::got_usr_bin): Mark as NO_COPY.
801         (mount_info::got_usr_lib): Ditto.
802         (mount_info::root_idx): Ditto.
803
804 2009-05-14  Corinna Vinschen  <corinna@vinschen.de>
805
806         * wchar.h (sys_mbstowcs): Add missing __stdcall attribute.
807
808 2009-05-14  Corinna Vinschen  <corinna@vinschen.de>
809
810         * cygheap.cc (cygheap_init): Set Cygwin default locale values.
811         * cygheap.h (struct cygheap_locale): New structure.
812         (struct user_heap_info): Add cygheap_locale member locale.
813         * dcrt0.cc (dll_crt0_1): Revert to calling _setlocale_r so that only
814         the applications locale is reverted to "C".
815         * environ.cc (environ_init): Remove unused got_lc variable.
816         * fhandler.h (class dev_console): Remove now unsed locale variables.
817         * fhandler_console.cc (fhandler_console::get_tty_stuff): Remove
818         setting dev_console's locale members.
819         (dev_console::con_to_str): Use internal locale settings.  Default to
820         __ascii_wctomb if charset is "ASCII".
821         (fhandler_console::write_normal): Ditto.
822         * strfuncs.cc (__ascii_wctomb): Drop declaration.
823         (__db_wctomb): Use fixed value 2 instead of not
824         necessarily matching MB_CUR_MAX.
825         (__eucjp_wctomb): Use 3 instead of MB_CUR_MAX.
826         (sys_cp_wcstombs): Remove special case for "C" locale.
827         (sys_wcstombs): Implement here.  Use internal locale data stored on
828         cygheap.
829         (sys_cp_mbstowcs): Remove special case for "C" locale.
830         (sys_mbstowcs): Implement here.  Use internal locale data stored on
831         cygheap.
832         * syscalls.cc (internal_setlocale): New function to set cygheap locale
833         data and to reset CWD posix path.
834         (setlocale): Just call internal_setlocale from here if necessary.
835         * wchar.h (__ascii_wctomb): Declare.
836         (sys_wcstombs): Don't define inline, just declare.
837         (sys_mbstowcs): Ditto.
838
839 2009-05-14  Christopher Faylor  <me+cygwin@cgf.cx>
840
841         * mount.cc (mount_info::init): Remove MOUNT_CYGWIN_EXEC setting when
842         auto-mounting /usr/bin.
843
844 2009-05-14  Corinna Vinschen  <corinna@vinschen.de>
845
846         * mount.cc (oopts): Add a no-op "auto" option.
847         (mount_info::create_root_entry): Set root dir to MOUNT_IMMUTABLE rather
848         than to MOUNT_OVERRIDE.
849
850 2009-05-13  Corinna Vinschen  <corinna@vinschen.de>
851             Christopher Faylor  <me+cygwin@cgf.cx>
852
853         * mount.cc (mount_info::got_usr_bin): Define.
854         (mount_info::got_usr_lib): Ditto.
855         (mount_info::root_idx): Ditto.
856         (mount_info::create_root_entry): Create root entry as immutable and
857         flag as automatic.
858         (mount_info::init): Remove "Huh?  No /etc/fstab..." warning.
859         Unconditionally call from_fstab for user and system tables.  Fill in
860         /usr/bin and /usr/lib if they have not been specified in /etc/fstab.
861         (oopts): Alphabetize.  Add "override" option to allow overriding
862         immutable mount points.
863         (mount_info::add_item): Accommodate new MOUNT_IMMUTABLE flag intended
864         for root mount.
865         (mount_info::add_item): Detect "/usr/bin", "/usr/lib", and "/" and set
866         appropriate global state.
867         (fillout_mntent): Add ,auto to mount points added by Cygwin DLL.
868         (mount): Remove masking of MOUNT_SYSTEM.  Allow user to shoot
869         themselves.  Add comment.
870         * mount.h (mount_info::got_usr_bin): Declare.
871         (mount_info::got_usr_lib): Ditto.
872         (mount_info::root_idx): Ditto.
873         * include/sys/mount.h: Reformat enum.
874         Add MOUNT_{OVERRIDE,IMMUTABLE,AUTOMATIC}.
875
876 2009-05-13  Corinna Vinschen  <corinna@vinschen.de>
877
878         * cygheap.h (cwdstuff): Convert to class.  Make posix and dir private.
879         (cwdstuff::get_posix): New method.
880         (cwdstuff::reset_posix): New method.
881         * dcrt0.cc (dll_crt0_1): Call setlocale rather than _setlocale_r.
882         * environ.cc (environ_init): Ditto.  Prefer "C" locale over current
883         codepage default locale.
884         * path.cc (chdir): Use cwdstuff::get_posix method instead of accessing
885         cwdstuff::posix directly.
886         (cwdstuff::set): Defer creating posix path to first usage.
887         (cwdstuff::get_posix): Create posix path if it's empty, and return it.
888         (cwdstuff::get): Create posix path if it's empty.
889         * strfuncs.cc (sys_cp_wcstombs): Use UTF-8 conversion in the "C"
890         locale.
891         (sys_cp_mbstowcs): Ditto.
892         * syscalls.cc (gen_full_path_at): Fetch CWD posix path locked.
893         (setlocale): Implement here.  Reset CWD posix path.
894
895 2009-05-09  Christopher Faylor  <me+cygwin@cgf.cx>
896
897         * cygwin/version.h (CYGWIN_VERSION_CYGWIN_CONV): New define.
898
899 2009-05-09  Corinna Vinschen  <corinna@vinschen.de>
900
901         * dtable.cc (dtable::init_std_file_from_handle): Add workaround for
902         Windows 7 64 bit issue.  Add lengthy comment to explain what happens.
903         * wincap.h (wincaps::has_console_handle_problem): New element.
904         * wincap.cc: Implement above element throughout.
905         (wincap_7): New wincaps structure for NT 6.1 kernels.
906         (wincapc::init): Set has_console_handle_problem to false for 32 bit
907         systems.
908
909 2009-05-09  Corinna Vinschen  <corinna@vinschen.de>
910
911         * sec_auth.cc (str2uni_cat): Move from here...
912         * path.cc (str2uni_cat): ...to here.  Simplify.  Make static inline.
913         (get_nt_native_path): Use RtlAppendUnicodeToString rather than
914         str2uni_cat for constant strings for speed.
915         * security.h (str2uni_cat): Drop declaration.
916
917 2009-05-08  Corinna Vinschen  <corinna@vinschen.de>
918             IWAMURO Motonori <deenheart@gmail.com>
919
920         * strfuncs.cc (sys_cp_wcstombs): save and restore previous errno value.
921         (sys_cp_mbstowcs): Ditto.
922
923 2009-05-08  IWAMURO Motonori <deenheart@gmail.com>
924
925         * strfuncs.cc (sys_cp_wcstombs): Set errno to 0 before converting
926         wide char to SO/UTF-8 sequence.
927
928 2009-05-08  Corinna Vinschen  <corinna@vinschen.de>
929
930         * include/sys/select.h: Guard definitions with __USE_W32_SOCKETS as
931         the accompanying fd_set definitions in newlib's sys/types.h.
932
933 2009-05-06  Christopher Faylor  <me+cygwin@cgf.cx>
934
935         * fhandler_console.cc (fhandler_console::ioctl): Properly treat
936         TIOCLINUX argument as a char.
937         * fhandler_tty.cc (fhandler_tty_slave::ioctl): Use coercion to properly
938         set char value.
939
940 2009-05-06  Corinna Vinschen  <corinna@vinschen.de>
941
942         * libc/minires.c (scanline): Fix type in calls to ctype functions
943         to stay in unsigned char range for char values >= 0x80.
944         * regex/regcomp.c: Ditto, throughout.
945         * regex/regex2.h (ISWORD): Ditto.
946
947 2009-05-06  Corinna Vinschen  <corinna@vinschen.de>
948
949         * cygheap.cc (cygheap_init): Set umask to a sane default.
950         * uinfo.cc (cygheap_user::ontherange): Don't use HOMEDRIVE/HOMEPATH
951         to set HOME.  Default to /home/USERNAME.
952
953 2009-05-03  Corinna Vinschen  <corinna@vinschen.de>
954
955         * security.cc (set_file_sd): Drop using FILE_OPEN_FOR_RECOVERY flag in
956         call to NtOpenFile.
957         * exceptions.cc (open_stackdumpfile): Ditto in call to NtCreateFile.
958         * fhandler.cc (fhandler_base::open): Ditto.  Simplify setting
959         create_options.
960
961         * mount.cc (fs_info::update): Recognize offline storage.
962         (fillout_mntent): Report UDF and offline storage.
963         * mount.h (class fs_info): Add is_csc_cache status flag.
964
965 2009-05-04  Christopher Faylor  <me+cygwin@cgf.cx>
966
967         * fhandler_console.cc (fhandler_console::write_console): Eliminate
968         unneeded debugging output.
969         (fhandler_console::write_normal): Eliminate unneeded __seterrno.
970
971 2009-05-04  Christopher Faylor  <me+cygwin@cgf.cx>
972
973         * libc/minires.c (scanline): Accommodate ctype changes which disallow
974         use of an unadorned char argument to is* macros.
975         * regex/regcomp.c: Ditto, throughout.
976         * regex/regex2.h (ISWORD): Ditto.
977
978 2009-05-03  Christopher Faylor  <me+cygwin@cgf.cx>
979
980         * fhandler.h (fhandler_console::MAX_WRITE_CHARS): Declare.
981         (fhandler_console::write_replacement_char): Declare as inline.
982         (fhandler_console::write_console): Declare new function.
983         * fhandler_console.cc (fhandler_console::MAX_WRITE_CHARS): Define.
984         (handler_console::write_console): Define.
985         (fhandler_console::write_replacement_char): Define as inline.
986         (fhandler_console::write_normal): Use write_console when writing
987         buffers of unknown length.
988
989 2009-04-26  Yaakov Selkowitz  <yselkowitz@users.sourceforge.net>
990
991         * include/cygwin/socket.h: Define SOL_IPV6.
992
993 2009-04-21  Corinna Vinschen  <corinna@vinschen.de>
994
995         * ctype.cc (__set_ctype): Copy exact part of the current active
996         character class array.
997
998 2009-04-20  Corinna Vinschen  <corinna@vinschen.de>
999
1000         * flock.cc (lf_setlock): Handle border case which results in WFMO loop
1001         exiting with ret == WAIT_TIMEOUT gracefully.  Add a system_printf to
1002         uncover other potential problems with WFMO loop.
1003
1004 2009-04-18  Christopher Faylor  <me+cygwin@cgf.cx>
1005
1006         * mkimport: Specify .text for stub explicitly.
1007         * speclib: Add a dummy '.idata$7' section referring to the dll
1008         associated with the real import library.
1009
1010 2009-04-18  Corinna Vinschen  <corinna@vinschen.de>
1011
1012         * dcrt0.cc (globify): Only call mbtowc for non-ascii chars.
1013
1014 2009-04-17  Corinna Vinschen  <corinna@vinschen.de>
1015
1016         * dcrt0.cc (globify): Make multibyte-aware.
1017
1018 2009-04-17  Corinna Vinschen  <corinna@vinschen.de>
1019
1020         * flock.cc (class inode_t): Add i_wait member and matching methods
1021         wait(), unwait(), and waiting().
1022         (inode_t::inode_t): Initialize i_wait to 0.
1023         (fhandler_disk_file::lock): Only remove node if no other thread is
1024         waiting for a blocking lock.
1025         (lf_setlock): Manipulate node->i_wait to signal that a thread is
1026         waiting for a blocking lock in this node.
1027         (lf_findoverlap): Reinstantiate SELF test as in original code.
1028
1029 2009-04-16  Corinna Vinschen  <corinna@vinschen.de>
1030
1031         * dlfcn.cc (get_full_path_of_dll): Just return a bool value.  Drop
1032         local path_conv in favor of getting it as parameter.  Add local string
1033         buffer instead of getting it as parameter.
1034         (dlopen): Accommodate get_full_path_of_dll change.  Fetch WCHAR Windows
1035         path from path_conv variable and call LoadLibraryW.
1036
1037 2009-04-16  Corinna Vinschen  <corinna@vinschen.de>
1038
1039         * ntdll.h (STATUS_LOCK_NOT_GRANTED): Define.
1040         * syscalls.cc (unlink_nt): Handle STATUS_LOCK_NOT_GRANTED same as
1041         STATUS_SHARING_VIOLATION.  Add lengthy comment to explain why.
1042
1043 2009-04-15  Corinna Vinschen  <corinna@vinschen.de>
1044
1045         * path.cc (path_conv::get_wide_win32_path): Allow relative paths.
1046         (cygwin_conv_path): In case of CCP_POSIX_TO_WIN_W, convert relative
1047         paths to absolute paths if the relative pathname length exceeds
1048         MAX_PATH.
1049
1050 2009-04-15  Corinna Vinschen  <corinna@vinschen.de>
1051
1052         * libc/bsdlib.cc: Align copyright with upstream.
1053         * libc/fnmatch.c: Ditto.
1054         * libc/fts.c: Ditto.
1055         * libc/inet_addr.c: Ditto.
1056         * libc/inet_network.c: Ditto.
1057         * libc/rcmd.cc: Ditto.
1058         * libc/rexec.cc: Ditto.
1059
1060 2009-04-14  Christopher Faylor  <me+cygwin@cgf.cx>
1061
1062         * speclib: Really revert to using tempdir.
1063
1064 2009-04-14  Christopher Faylor  <me+cygwin@cgf.cx>
1065
1066         * speclib: Revert to using tempdir.
1067
1068 2009-04-14  Corinna Vinschen  <corinna@vinschen.de>
1069
1070         * localtime.cc (tzload): Implement setting __tzrule's offset member
1071         using newlib's __gettzinfo () interface also when tzload returns
1072         successfully.
1073
1074 2009-04-13  Dave Korn  <dave.korn.cygwin@gmail.com>
1075
1076         * include/stdint.h (intptr_t): Remove long from type.
1077         (uintptr_t): Likewise.
1078         (INTPTR_MIN): Remove 'L' suffix.
1079         (INTPTR_MAX, UINTPTR_MAX): Likewise.
1080
1081 2009-04-12  Christopher Faylor  <me+cygwin@cgf.cx>
1082
1083         * speclib: Initial stab at cleaning up temp files.  More work needed.
1084         * mkimport: Ditto.
1085
1086 2009-04-12  Christopher Faylor  <me+cygwin@cgf.cx>
1087
1088         * Makefile.in (clean): Clean globals.h.
1089         (LIBCOS): Depend on globals.h.
1090
1091 2009-04-11  Christopher Faylor  <me+cygwin@cgf.cx>
1092
1093         * mkimport: New script to perform all operations necessary to create
1094         libcygwin.a.
1095         * rmsym: Delete.
1096         * newsym: Delete.
1097         * Makefile.in (toolopts): New variable which holds options relating to
1098         binutils/gcc tools.
1099         (speclib): Use toolopts.  Add symbols to avoid copying to special
1100         libraries.
1101         (OBSOLETE_FUNCTIONS): Delete.
1102         (NEW_FUNCTIONS): Change to represent an argument to new mkimport
1103         script.
1104         (libcygwin.a): Use only new mkimport script to create libcygwin.a.
1105         Only rely on ${LIBCOS}.
1106         (*/lib*.a): Simplify speclib dependencies.
1107         (speclib): Accept toolchain options.  Convert every argument to
1108         absolute path.  Simplify parsing of nm output.  Accommodate new
1109         exclude option.
1110
1111 2009-04-11  Dave Korn <dave.korn.cygwin@googlemail.com>
1112
1113         * include/stdint.h (INTPTR_MIN, INTPTR_MAX): Add 'L' suffix.
1114         (WINT_MAX): Add 'U' suffix.
1115
1116 2009-04-10  Christopher Faylor  <me+cygwin@cgf.cx>
1117
1118         * speclib: Use a more robust method to derive full file path.
1119
1120 2009-04-09  Christopher Faylor  <me+cygwin@cgf.cx>
1121
1122         * speclib: Semi-revert to previous version but don't try to generate
1123         well-formed import library.  Instead, just extract appropriate symbols
1124         and let later libcygwin.a on link line fill in the rest of the import
1125         stuff.
1126         * gendef: Hopefully no-op modification to allow easier post-processing
1127         on symbol values.
1128
1129 2009-04-09  Corinna Vinschen  <corinna@vinschen.de>
1130
1131         * syscalls.cc (try_to_bin): Use tmp_pathbuf buffer to allocate infobuf
1132         rather than using the stack.
1133
1134 2009-04-09  Corinna Vinschen  <corinna@vinschen.de>
1135
1136         * syscalls.cc (try_to_bin): Fix alignment of infobuf.
1137
1138 2009-04-09  Corinna Vinschen  <corinna@vinschen.de>
1139
1140         * fhandler_disk_file.cc (fhandler_disk_file::fchown): Catch an
1141         error when changing the user account on a standalone Samba server.
1142         Explain why.
1143         * sec_acl.cc (setacl): Accommodate additional parameter to set_file_sd.
1144         * sec_helper.cc (SECURITY_SAMBA_UNIX_AUTHORITY): Define.
1145         (well_known_samba_unix_user_fake_sid): Define.
1146         * security.cc (set_file_sd): Take additional parameter if ownership
1147         should be changed.  Restrict requested permissions accordingly.
1148         (set_file_attribute): Accommodate additional parameter to set_file_sd.
1149         * security.h (well_known_samba_unix_user_fake_sid): Declare.
1150         (set_file_sd): Align declaration to above change.
1151
1152 2009-04-07  Corinna Vinschen  <corinna@vinschen.de>
1153
1154         * include/stdint.h (int_least32_t): Define as int.
1155         (uint_least32_t): Ditto, unsigned.
1156         (int_fast16_t): Define as int.
1157         (int_fast32_t): Ditto.
1158         (uint_fast16_t): Ditto, unsigned.
1159         (uint_fast32_t): Ditto.
1160         (UINT32_MAX): Remove `L' long marker.
1161         (UINT_LEAST32_MAX): Ditto.
1162         (UINT_FAST16_MAX): Ditto.
1163         (UINT_FAST32_MAX): Ditto.
1164         (INT32_C): Ditto.
1165         (UINT32_C): Ditto.
1166
1167 2009-04-07  Corinna Vinschen  <corinna@vinschen.de>
1168
1169         * strfuncs.cc: Change WCHAR to wchar_t in multibyte<->widechar
1170         conversion functions throughout.
1171         * wchar.h: Ditto in declarations.  Guard them __INSIDE_CYGWIN__.
1172
1173 2009-04-07  Corinna Vinschen  <corinna@vinschen.de>
1174
1175         * fhandler.h (class dev_console): Add members con_mbtowc, con_wctomb,
1176         and con_charset.
1177         (dev_console::str_to_con): Take mbtowc function pointer and charset
1178         as additional parameters.
1179         * fhandler_console.cc (fhandler_console::get_tty_stuff): Initialize
1180         aforementioned new members.  Explain why.
1181         (dev_console::con_to_str): Remove useless comment.  Call new
1182         sys_cp_wcstombs function rather than sys_wcstombs.
1183         (dev_console::str_to_con): Take mbtowc function pointer and charset
1184         as additional parameters.  Call sys_cp_mbstowcs accordingly.
1185         (fhandler_console::write_normal): Only initialize f_mbtowc and charset
1186         once.  Accommodate changed str_to_con.
1187         * strfuncs.cc (sys_cp_wcstombs): Renamed from sys_wcstombs.  Take
1188         wctomb function pointer and charset as parameters.  Use throughout.
1189         (sys_cp_mbstowcs): Take wctomb function pointer and charset as
1190         parameters instead of codepage.  Remove matching local variables and
1191         their initialization.
1192         * wchar.h (ENCODING_LEN): Define as in newlib.
1193         (__mbtowc): Use mbtowc_p typedef for declaration.
1194         (wctomb_f): New type.
1195         (wctomb_p): New type.
1196         (__wctomb): Declare.
1197         (__utf8_wctomb): Use wctomb_f typedef for declaration.
1198         (sys_cp_wcstombs): Move declaration from winsup.h here.
1199         (sys_wcstombs): Ditto.
1200         (sys_wcstombs_alloc): Ditto.
1201         (sys_cp_mbstowcs): Ditto.
1202         (sys_mbstowcs): Ditto.
1203         (sys_mbstowcs_alloc): Ditto.
1204         * winsup.h: Move declaration of sys_FOO functions to wchar.h.  Include
1205         wchar.h instead.
1206
1207 2009-04-06  Earl Chew <earl_chew@agilent.com>
1208
1209         * libc/rexec.cc (ruserpass): Use fstat64 instead of fstat.
1210
1211 2009-04-06  Corinna Vinschen  <corinna@vinschen.de>
1212
1213         * strfuncs.cc: Add comment to explain why we can't support JIS
1214         for now.
1215         (__db_wctomb): Alwaus use WC_NO_BEST_FIT_CHARS.
1216         (__jis_wctomb): Just call __ascii_wctomb from here.
1217         (__eucjp_wctomb): Convert to standalone implementation to fix up the
1218         difference between eucJP and CP 20932 affecting JIS-X-0212 characters.
1219         Explain.
1220         (__kr_wctomb): Use codepage 949.
1221         (__db_mbtowc): Reorder code slightly.  Always use MB_ERR_INVALID_CHARS
1222         in call to MultiByteToWideChar.  Fix a problem with singlebyte
1223         sequences.  Fix a bug in '\0' handling.  Reset state->__count on
1224         successful return from non-zero state.
1225         (__jis_mbtowc): Just call __ascii_mbtowc from here.
1226         (__eucjp_mbtowc): Convert to standalone implementation to fix up the
1227         difference between eucJP and CP 20932 affecting JIS-X-0212 characters.
1228         (__kr_mbtowc): Use codepage 949.
1229         (__set_charset_from_codepage): Handle codepage 20932 as eucJP.
1230
1231 2009-04-05  Christopher Faylor  <me+cygwin@cgf.cx>
1232
1233         * Makefile.in: Use all compile options when calculating magic values.
1234         * shared_info.h (CURR_SHARED_MAGIC): Revert erroneous value.
1235         * child_info.h (CURR_CHILD_INFO_MAGIC): Update.
1236
1237         * fhandler.h (acquire_output_mutex): Remove unneeded ';'.
1238         (release_output_mutex): Ditto.
1239
1240 2009-04-05  Christopher Faylor  <me+cygwin@cgf.cx>
1241
1242         * net.cc: Undefine NOERROR and DELETE to avoid compiler warnings.
1243         * shared_info.h (CURR_SHARED_MAGIC): Update.
1244         * spawn.cc (spawn_guts): Avoid copying one line command line argument
1245         if it hasn't been filled out.
1246
1247 2009-04-04  Yaakov Selkowitz  <yselkowitz@users.sourceforge.net>
1248             Corinna Vinschen  <corinna@vinschen.de>
1249
1250         * include/asm/byteorder.h (__ntohl): Prototype before define to avoid
1251         a warning with -Wmissing-prototypes.  Use _ELIDABLE_INLINE macro from
1252         _ansi.h.
1253         (__ntohs): Ditto.
1254
1255 2009-04-02  Corinna Vinschen  <corinna@vinschen.de>
1256
1257         * environ.cc (build_env): Fix length calculation of resulting
1258         wide char environment string.
1259
1260 2009-04-02  Yaakov Selkowitz  <yselkowitz@users.sourceforge.net>
1261
1262         * include/netdb.h: #include <inttypes.h>, <netinet/in.h>,
1263         and <sys/socket.h> per SUSv3.
1264
1265 2009-04-01  Corinna Vinschen  <corinna@vinschen.de>
1266
1267         * strfuncs.cc (sys_cp_mbstowcs): Check if ASCII SO is followed by at
1268         least two chars and the next byte is a valid UTF-8 start byte before
1269         trying to convert the followup bytes as UTF-8 sequence.
1270
1271 2009-03-31  Corinna Vinschen  <corinna@vinschen.de>
1272
1273         * shm.cc (struct shm_attached_list): Convert access type to ULONG.
1274         (fixup_shms_after_fork): Fix comment.  Use NtMapViewOfSection rather
1275         than MapViewOfFileEx to recreate shared memory regions.  Add function
1276         name to api_fatal output.
1277         (shmat): Use NtMapViewOfSection to create shared memory region
1278         top-down.
1279
1280 2009-03-31  Corinna Vinschen  <corinna@vinschen.de>
1281
1282         * ctype.cc: Remove implementation of ctype functions in favor of
1283         pointer-based newlib implementation.
1284         (_ctype_b): Declare.
1285         (__ctype_cp): Move to newlib. Declare.
1286         (__ctype_iso): Ditto.
1287         (__set_ctype): Implement changing __ctype_ptr__.  Only copy character
1288         class data in applications built under older Cygwin.
1289         * cygwin.din (__ctype_ptr__): Export.
1290         * include/ctype.h: Remove in favor of newlib implementation.
1291         * include/cygwin/config.h (__EXPORT): Define alongside __IMPORT.
1292         * include/cygwin/version.h (CYGWIN_VERSION_CHECK_FOR_OLD_CTYPE):
1293         Define check for old vs. new ctype implementation.
1294         Bump API minor number.
1295
1296 2009-03-28  Christopher Faylor  <me+cygwin@cgf.cx>
1297
1298         * Makefile.in: Perform some minor cleanup.  Revamp speclib handling.
1299         * speclib: Rewrite to create libraries with dlltool rather than
1300         attempting surgery on libcygwin.a.
1301
1302 2009-03-27  Corinna Vinschen  <corinna@vinschen.de>
1303
1304         * net.cc (inet_ntop6): Convert to lowercase hex digits on the fly.
1305
1306 2009-03-27  Corinna Vinschen  <corinna@vinschen.de>
1307
1308         * net.cc (cygwin_getaddrinfo): Check hints for non-NULL before
1309         checking its content.
1310
1311 2009-03-27  Corinna Vinschen  <corinna@vinschen.de>
1312
1313         * fhandler.h (class fhandler_fifo): Rename read/write methods to
1314         raw_read/raw_write.
1315         * fhandler_fifo.cc: Ditto.
1316
1317 2009-03-27  Corinna Vinschen  <corinna@vinschen.de>
1318
1319         * syscalls.cc (pathconf): Fix memory leak.
1320
1321 2009-03-26  Corinna Vinschen  <corinna@vinschen.de>
1322
1323         * path.cc (symlink_worker): Write target filename as UTF-16 string
1324         with leading BOM marker.
1325         (symlink_info::check_shortcut): If check for leading BOM marker
1326         succeeds, read filename as UTF-16 string.
1327         (symlink_info::check_sysfile): Ditto.
1328
1329 2009-03-26  Yaakov Selkowitz  <yselkowitz@users.sourceforge.net>
1330
1331         * include/asm/byteorder.h (__ntohl): Align definition to ISO C99.
1332         (__ntohs): Ditto.
1333
1334 2009-03-26  Corinna Vinschen  <corinna@vinschen.de>
1335
1336         * strfuncs.cc (__set_charset_from_codepage): Revert to translating
1337         codepage 936 to "GBK".
1338
1339 2009-03-25  Corinna Vinschen  <corinna@vinschen.de>
1340
1341         * strfuncs.cc (sys_wcstombs): Don't convert ASCII SO into two
1342         ASCII SO's.
1343
1344 2009-03-25  Corinna Vinschen  <corinna@vinschen.de>
1345
1346         * environ.cc (environ_init): Break from locale loop after first hit.
1347         * fhandler_console.cc (fhandler_console::write_normal): Print a SO
1348         sequence using always valid Unicode chars.
1349
1350 2009-03-25  Corinna Vinschen  <corinna@vinschen.de>
1351
1352         * strfuncs.cc (__kr_wctomb): Use codepage 51949 rather than 50949.
1353         (__kr_mbtowc): Ditto.
1354         (__set_charset_from_codepage): Ditto.  Translate codepage 936 to
1355         "GB2312" and drop the charset name "GBK".
1356
1357 2009-03-24  Corinna Vinschen  <corinna@vinschen.de>
1358
1359         * strfuncs.cc (__kr_wctomb): Use codepage 50949 rather than 949.
1360         (__kr_mbtowc): Ditto.
1361         (__set_charset_from_codepage): Translate codepages 949 and 50949 to
1362         "EUCKR" and drop the charset name "CP949".
1363
1364 2009-03-24  Corinna Vinschen  <corinna@vinschen.de>
1365
1366         * strfuncs.cc (sys_cp_mbstowcs): Don't read beyond src + nms.
1367
1368 2009-03-24  Corinna Vinschen  <corinna@vinschen.de>
1369
1370         * shared_info.h (CURR_SHARED_MAGIC): Update.
1371
1372 2009-03-24  Corinna Vinschen  <corinna@vinschen.de>
1373
1374         * wchar.h: Replace UINT with unsigned int.
1375
1376 2009-03-24  Corinna Vinschen  <corinna@vinschen.de>
1377
1378         * wchar.h: Remove erroneous "C" specifier from extern declaration.
1379
1380 2009-03-24  Corinna Vinschen  <corinna@vinschen.de>
1381
1382         * ctype.cc (_CTYPE_DATA_0_127): Add _B class to TAB character.
1383         (__ctype_default): New character class array for default ASCII
1384         character set.
1385         (__ctype_iso): New array of character class array for ISO charsets.
1386         (__ctype_cp): Ditto for singlebyte Windows codepages.
1387         (tolower): Implement as distinct function to support any singlebyte
1388         charset.
1389         (toupper): Ditto.
1390         (__set_ctype): New function to copy singlebyte character classes
1391         corresponding to current charset to ctype_b array.
1392         Align copyright text to upstream.
1393         * dcrt0.cc (dll_crt0_1): Reset current locale to "C" per POSIX.
1394         * environ.cc (set_file_api_mode): Remove.
1395         (codepage_init): Remove.
1396         (parse_thing): Remove "codepage" setting.
1397         (environ_init): Set locale according to environment settings, or
1398         to current codepage, before converting environment to multibyte.
1399         * fhandler.h (fhandler_console::write_replacement_char): Drop argument.
1400         * fhandler_console.cc (dev_console::str_to_con): Call sys_cp_mbstowcs
1401         rather than MultiByteToWideChar.
1402         (fhandler_console::write_replacement_char): Always print a funny
1403         half filled square if a character isn't in the current charset.
1404         (fhandler_console::write_normal): Convert to using __mbtowc
1405         rather than next_char.
1406         * fork.cc (frok::child): Drop call to set_file_api_mode.
1407         * globals.cc (enum codepage_type) Remove.
1408         (current_codepage): Remove.
1409         * miscfuncs.cc (cygwin_wcslwr): Unused, dangerous.  Remove.
1410         (cygwin_wcsupr): Ditto.
1411         (is_cp_multibyte): Remove.
1412         (next_char): Remove.
1413         * miscfuncs.h (is_cp_multibyte): Drop declaration.
1414         (next_char): Ditto.
1415         * strfuncs.cc (get_cp): Remove.
1416         (__db_wctomb): New function to implement _wctomb_r functionality for
1417         doublebyte charsets using WideCharToMultiByte.
1418         (__sjis_wctomb): New function to replace unusable newlib function.
1419         (__jis_wctomb): Ditto.
1420         (__eucjp_wctomb): Ditto.
1421         (__gbk_wctomb): New function.
1422         (__kr_wctomb): Ditto.
1423         (__big5_wctomb): Ditto.
1424         (__db_mbtowc): New function to implement _mbtowc_r functionality for
1425         doublebyte charsets using MultiByteToWideChar.
1426         (__sjis_mbtowc): New function to replace unusable newlib function.
1427         (__jis_mbtowc): Ditto.
1428         (__eucjp_mbtowc): Ditto.
1429         (__gbk_mbtowc): New function.
1430         (__kr_mbtowc): New function
1431         (__big5_mbtowc): New function
1432         (__set_charset_from_codepage): New function.
1433         (sys_wcstombs): Reimplement, basically using same wide char to multibyte
1434         conversion as newlib's application level functions.  Plus extras.
1435         Add lengthy comment to explain.  Change return type to size_t.
1436         (sys_wcstombs_alloc): Just use sys_wcstombs.  Change return type to
1437         size_t.
1438         (sys_cp_mbstowcs): Replace sys_mbstowcs, take additional codepage
1439         argument.  Explain why.  Change return type to size_t.
1440         (sys_mbstowcs_alloc): Just use sys_mbstowcs.  Change return type to
1441         size_t.
1442         * wchar.h: Declare internal functions implemented in strfuncs.cc.
1443         (wcscasecmp): Remove.
1444         (wcsncasecmp): Remove.
1445         (wcslwr): Remove.
1446         (wcsupr): Remove.
1447         * winsup.h (codepage_init): Remove declaration.
1448         (get_cp): Ditto.
1449         (sys_wcstombs): Align declaration to new implementation.
1450         (sys_wcstombs_alloc): Ditto.
1451         (sys_cp_mbstowcs): Add declaration.
1452         (sys_mbstowcs): Define as inline function.
1453         (sys_mbstowcs_alloc): Align declaration to new implementation.
1454         (set_file_api_mode): Remove declaration.
1455         * include/ctype.h (isblank): Redefine to use _B character class.
1456         (toupper): Remove ASCII-only definition.
1457         (tolower): Ditto.
1458
1459 2009-03-24  Corinna Vinschen  <corinna@vinschen.de>
1460
1461         * sec_auth.cc (str2buf2uni): Remove.
1462         * security.h (str2buf2uni): Remove declaration.
1463
1464 2009-03-24  Yaakov Selkowitz  <yselkowitz@cygwin.com>
1465
1466         * include/mntent.h: Remove declarations of nonexistant addmntent
1467         and hasmntopt.  Update and clarify the /etc/mtab comment.
1468
1469 2009-03-23  Corinna Vinschen  <corinna@vinschen.de>
1470
1471         * smallprint.cc (__small_vsprintf): Handle NULL PWCHAR and
1472         PUNICODE_STRING arguments.
1473         (__small_vswprintf): Ditto.
1474
1475 2009-03-23  Corinna Vinschen  <corinna@vinschen.de>
1476
1477         * include/asm/byteorder.h (__constant_ntohs): Remove declaration.
1478         (__constant_ntohl): Ditto.
1479
1480 2009-03-23  Corinna Vinschen  <corinna@vinschen.de>
1481
1482         * cygwin.din: Export wordexp, wordfree.
1483         * posix.sgml: Move them to SUSv4 list.
1484         * include/cygwin/version.h: Bump API minor number.
1485
1486 2009-03-22  Yaakov Selkowitz  <yselkowitz@users.sourceforge.net>
1487
1488         * include/sys/un.h: #include <string.h> for strlen.
1489
1490 2009-03-19  Corinna Vinschen  <corinna@vinschen.de>
1491
1492         * dlfcn.cc (get_full_path_of_dll): Revert patch from 2008-07-16.
1493
1494 2009-03-19  Yaakov Selkowitz  <yselkowitz@users.sourceforge.net>
1495
1496         * cygwin.din: Export log2, log2f as functions.
1497         * posix.sgml: Add them to SUSv4 list.
1498         * include/cygwin/version.h: Bump API minor number.
1499
1500 2009-03-18  Corinna Vinschen  <corinna@vinschen.de>
1501
1502         * sec_auth.cc (lsaauth): Remove local definitions of struct
1503         _TOKEN_LINKED_TOKEN and TokenLinkedToken in favor of definitions
1504         from winnt.h.
1505         (lsaprivkeyauth): As in lsaauth, fetch linked token if available and
1506         return that in favor of default token.
1507
1508 2009-03-15  Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
1509
1510         * errno.cc (_sys_errlist): Add ESTRPIPE.
1511
1512 2009-03-15  Corinna Vinschen  <corinna@vinschen.de>
1513
1514         * cygwin.din: Export wcsdup.
1515         * posix.sgml: Add wcsdup to SUSv4 list.
1516         * include/cygwin/version.h: Bump API minor number.
1517
1518 2009-03-15  Corinna Vinschen  <corinna@vinschen.de>
1519
1520         * include/inttypes.h: Remove "l" size specifier from all 16 and 32 bit
1521         definitions.
1522
1523 2009-03-14  Christopher Faylor  <me+cygwin@cgf.cx>
1524
1525         * path.cc (warn_msdos): Don't warn about MS-DOS filenames encountered
1526         during initialization.
1527
1528 2009-03-14  Corinna Vinschen  <corinna@vinschen.de>
1529
1530         * gendef: Remove STABS directives.
1531
1532 2009-03-13  Corinna Vinschen  <corinna@vinschen.de>
1533
1534         * mktemp.cc: Remove STABS specific link-time warning.  Align copyright
1535         text to upstream.
1536
1537 2009-03-13  Corinna Vinschen  <corinna@vinschen.de>
1538
1539         * flock.cc: Fix lockf copyright to latest version.
1540
1541 2009-03-12  Corinna Vinschen  <corinna@vinschen.de>
1542
1543         * fhandler_disk_file.cc (path_conv::isgood_inode): Move to be defined
1544         earlier.
1545         (get_ino_by_handle): Take additional path_conv argument, accommodate
1546         throughout.  Only use FileId if isgood_inode check is true.
1547         (fhandler_base::open_fs): Simplify setting ino due to above change.
1548         (readdir_get_ino): Make sure to return always a non-zero inode number.
1549         (fhandler_disk_file::readdir): Always open file in dir with
1550         FILE_OPEN_REPARSE_POINT so as not to open wrong file.
1551         Drop call to isgood_inode here.
1552         * path.cc (symlink_info::check): Call fs.update in case we're fetching
1553         file information from call to NtQueryDirectoryFile.
1554
1555 2009-03-12  Corinna Vinschen  <corinna@vinschen.de>
1556
1557         * flock.cc (fhandler_disk_file::lock): Don't test file open mode in
1558         case of flock-type locks.  Explain why.
1559
1560 2009-03-12  Brian Ford <Brian.Ford@FlightSafety.com>
1561
1562         * gethostby_helper: Fix typos in DEBUGGING case.
1563
1564 2009-03-11  Corinna Vinschen  <corinna@vinschen.de>
1565
1566         * cygwin.din: Export wcscasecmp, wcsncasecmp.
1567         * posix.sgml: Move wcscasecmp, wcsncasecmp to SUSv4 list.
1568         * include/cygwin/version.h: Bump API minor number.
1569
1570 2009-03-11  Corinna Vinschen  <corinna@vinschen.de>
1571
1572         * cygwin.din: Export wscanf, fwscanf, swscanf, vwscanf, vfwscanf,
1573         vswscanf.
1574         * posix.sgml: Move fwscanf, swscanf, vwscanf, vfwscanf, vswscanf
1575         to SUSv4 list.
1576         * include/cygwin/version.h: Bump API minor number.
1577
1578 2009-03-09  Corinna Vinschen  <corinna@vinschen.de>
1579
1580         * fhandler.h (fhandler_socket::wait_for_events): Take additional
1581         parameter "dontwait".
1582         * fhandler_socket.cc (fhandler_socket::wait_for_events): Act as if the
1583         socket is non-blocking if dontwait is true.
1584         (fhandler_socket::recv_internal): Use incoming MSG_DONTWAIT flag to
1585         set the wait_for_events dontwait parameter.
1586         (fhandler_socket::send_internal): Ditto.  Optimize code slightly.
1587         * include/cygwin/socket.h (MSG_DONTWAIT): Define.
1588         * include/cygwin/version.h: Bump API minor number.
1589
1590 2009-03-09  Corinna Vinschen  <corinna@vinschen.de>
1591
1592         * cygwin.din: Export wcsftime.
1593         * posix.sgml: Move wcsftime to SUSv4 list.
1594         * include/cygwin/version.h: Bump API minor number.
1595
1596 2009-03-06  Pierre A. Humblet <pierre@phumblet.no-ip.org>
1597
1598         * cygwin.din: Export gethostbyname2.
1599         * net.cc: define _CYGWIN_IN_H and include resolv.h.
1600         (realloc_ent): New function.
1601         (dup_ent): Call realloc_ent.
1602         (memcpy4to6): New function.
1603         (dn_length1): New function.
1604         (gethostby_helper): New function.
1605         (gethostbyname2): New function.
1606         * posix.sgml: Add gethostbyname2.
1607         * include/cygwin/version.h: Bump API minor number.
1608         * libc/minires.c (get_options): Look for "inet6" and apply bounds
1609         to "retry" and "retrans".
1610         (res_ninit): Set the default options at the beginning.
1611         (dn_expand): Fix "off by one".
1612
1613 2009-03-06  Corinna Vinschen  <corinna@vinschen.de>
1614
1615         * cygwin.din: Export wprintf, fwprintf, swprintf, vwprintf, vfwprintf,
1616         vswprintf.  Sort.
1617         * posix.sgml: Move fwprintf, swprintf, vwprintf, vfwprintf, vswprintf
1618         to SUSv4 list.  Sort SUSv4 list.
1619         * include/cygwin/version.h: Bump API minor number.
1620
1621 2009-03-04  Corinna Vinschen  <corinna@vinschen.de>
1622
1623         * dcrt0.cc (disable_dep): Disable.  Explain why.
1624         (dll_crt0_0): Disable calling disable_dep.  Explain why.
1625
1626 2009-03-03  Corinna Vinschen  <corinna@vinschen.de>
1627
1628         * net.cc: Include asm/byteorder.h.
1629         (htonl): Move to end of file.  Add comment to explain why.  Align
1630         definition to POSIX.  Use related macro from asm/byteorder.h.
1631         (ntohl): Ditto.
1632         (htons): Ditto.
1633         (ntohs): Ditto.
1634         * include/asm/byteorder.h: Revert previous patch.
1635
1636 2009-03-03  Corinna Vinschen  <corinna@vinschen.de>
1637
1638         * include/asm/byteorder.h: Disable optimization when building
1639         Cygwin network code.
1640
1641 2009-02-26  Christopher Faylor  <me+cygwin@cgf.cx>
1642
1643         * dtable.cc (dtable::select_read): Add ability to override fh.
1644         * fhandler.h (fhandler_fifo::select_read): Declare new function.
1645         (fhandler_fifo::select_write): Ditto.
1646         (fhandler_fifo::select_except): Ditto.
1647         * select.cc (peek_pipe): Treat certain classes of pipe errors as "no
1648         data".
1649         (fhandler_fifo::select_read): Define new function.
1650         (fhandler_fifo::select_write): Ditto.
1651         (fhandler_fifo::select_except): Ditto.
1652
1653         * shared_info.h (CURR_SHARED_MAGIC): Update.
1654
1655 2009-02-23  Sjors Gielen <mailinglist@dazjorz.com>
1656
1657         * Makefile.in: Add DESTDIR functionality.
1658
1659 2009-02-23  Corinna Vinschen  <corinna@vinschen.de>
1660
1661         * sec_auth.cc (get_user_local_groups): Simplify LookupAccountName code.
1662
1663 2009-02-20  Corinna Vinschen  <corinna@vinschen.de>
1664
1665         * autoload.cc (NetLocalGroupEnum): Remove.
1666         (NetLocalGroupGetMembers): Remove.
1667         (NetUserGetLocalGroups): Add.
1668         * sec_auth.cc (is_group_member): Remove function.
1669         (get_user_local_groups): Get user as string instead of as SID.
1670         Call NetUserGetLocalGroups instead of NetLocalGroupEnum.  Drop call
1671         to is_group_member.
1672         (get_server_groups): Call get_user_local_groups with user name instead
1673         of user SID.
1674
1675 2009-02-19  Corinna Vinschen  <corinna@vinschen.de>
1676
1677         * winver.rc: Fix Copyright date.
1678
1679 2009-02-19  Corinna Vinschen  <corinna@vinschen.de>
1680
1681         * cygwin.din: Export mbsnrtowcs and wcsnrtombs.
1682         * posix.sgml: Move mbsnrtowcs and wcsnrtombs to SUSv4 section.
1683         * include/cygwin/version.h: Bump API minor number.
1684
1685 2009-02-18  Corinna Vinschen  <corinna@vinschen.de>
1686
1687         * cygwin.din: Export open_wmemstream.
1688         * posix.sgml: Move open_wmemstream to SUSv4 section.
1689         * include/cygwin/version.h: Bump API minor number.
1690
1691 2009-02-16  Corinna Vinschen  <corinna@vinschen.de>
1692
1693         * cygwin.din: Export reallocf.
1694         * malloc_wrapper.cc( reallocf): New function.
1695         * posix.sgml: Add reallocf to BSD section.
1696         * include/cygwin/version.h: Bump API minor number.
1697         * libc/fts.c: Remove erroneous reallocf definition.
1698
1699 2009-02-16  Corinna Vinschen  <corinna@vinschen.de>
1700
1701         * cygwin.din: Export wcstoimax, wcstoumax.
1702         * posix.sgml: Move wcstoimax and wcstoumax to SUSv4 section.
1703         * include/inttypes.h: Declare wcstoimax and wcstoumax.
1704         * include/cygwin/version.h: Bump API minor number.
1705
1706 2009-02-13  Corinna Vinschen  <corinna@vinschen.de>
1707
1708         * cygwin.din: Export wcsnlen.
1709         * posix.sgml: Move wcsnlen to SUSv4 section.
1710         * include/cygwin/version.h: Bump API minor number.
1711
1712 2009-02-13  Corinna Vinschen  <corinna@vinschen.de>
1713
1714         * environ.cc (_getenv_r): New function.
1715
1716 2009-02-13  Corinna Vinschen  <corinna@vinschen.de>
1717
1718         * posix.sgml: Move dirfd to SUSv4 section.
1719
1720 2009-02-13  Corinna Vinschen  <corinna@vinschen.de>
1721
1722         * posix.sgml: Move interfaces deprecated in SUSv4 to deprecated
1723         interfaces section.  Move interfaces added in SUSv4 to SUSv4
1724         section or, if unimplemented, add them to the unimplemented interfaces
1725         section.
1726
1727 2009-02-13  Corinna Vinschen  <corinna@vinschen.de>
1728
1729         * posix.sgml: Merge SUSv3 and SUSv4 section into a single SUSv4 section.
1730         Move Solaris calls now in SUSv4 to SUSv4 section.  Rename unimplemented
1731         section to refer to SUSv4.  Add note about missing interfaces.
1732         Move wcstod and wcstof from unimplemented to SUSv4 section.
1733
1734 2009-02-13  Corinna Vinschen  <corinna@vinschen.de>
1735
1736         * mount.cc (mount_info::from_fstab_line): Make cygdrive posix=0 by
1737         default as documented.
1738
1739 2009-02-13  Corinna Vinschen  <corinna@vinschen.de>
1740
1741         * cygwin.din: Export wcstod and wcstof.
1742         * include/cygwin/version.h: Bump API minor number.
1743
1744 2009-02-11  Corinna Vinschen  <corinna@vinschen.de>
1745
1746         * syscalls.cc (open): Handle O_DIRECTORY flag.
1747         * include/fcntl.h: Add SUSv4 flags O_DIRECTORY, O_EXEC and O_SEARCH.
1748         * include/cygwin/version.h: Bump API minor number.
1749
1750 2009-02-09  Corinna Vinschen  <corinna@vinschen.de>
1751
1752         * fhandler_floppy.cc (fhandler_dev_floppy::open): Fix format.  Add
1753         code to allow to read disk and CD/DVD devices in full length.  Explain
1754         why.
1755         (fhandler_dev_floppy::raw_read): Add current position to debug output.
1756
1757         * include/sys/sched.h: New stub file to override newlib file with
1758         clashing definitions.
1759
1760 2009-02-05  Corinna Vinschen  <corinna@vinschen.de>
1761
1762         * cygwin.din: Export wcstok.
1763         * posix.sgml: Move wcstok from unimplemented to susv3.
1764         * include/cygwin/version.h: Bump API minor number.
1765
1766 2009-02-04  Corinna Vinschen  <corinna@vinschen.de>
1767
1768         * fhandler_proc.cc (proc_tab): Add entry for mounts symlink.
1769         (format_proc_mounts): New function to implement mounts symlink.
1770         * fhandler_process.cc (process_tab): Add entry for mounts file.
1771         (format_process_mounts): New function to implement mounts file.
1772
1773 2009-02-04  Corinna Vinschen  <corinna@vinschen.de>
1774
1775         * security.cc (alloc_sd): Disable generating default permission entries
1776         for directories.
1777
1778 2009-01-29  Corinna Vinschen  <corinna@vinschen.de>
1779
1780         * fhandler_disk_file.cc (fhandler_disk_file::readdir): Fix inode number
1781         evaluation for faked "." entry.
1782
1783         * mount.cc (fs_info::update): Move setting of is_cdrom after checking
1784         for caseinsensitivity.  Recognize UDF in is_cdrom case and set
1785         caseinsensitive flag according to UDF brokenness determined by OS.
1786         Add comment to explain why.
1787         * mount.h (class fs_info): Add is_udf status flag.
1788         * path.cc (symlink_info::check): Add workaround for UDF bug in
1789         terms of casesensitivity on certain OSes.
1790         * wincap.h (wincaps::has_broken_udf): New element.
1791         * wincap.cc: Implement above element throughout.
1792
1793 2009-01-27  Christopher Faylor  <me+cygwin@cgf.cx>
1794
1795         * fhandler.cc (fhandler_base::wait_overlapped): Set bytes to -1 on
1796         EINTR or real error.
1797         (fhandler_base::write_overlapped): Assume that bytes_written will
1798         contain proper error value.
1799         * pipe.cc (fhandler_pipe::fhandler_pipe): Set uninterruptible_io since
1800         signals are handled by pipe functions now.
1801
1802 2009-01-26  Corinna Vinschen  <corinna@vinschen.de>
1803
1804         * shared.cc (shared_name): New function for WCHAR names.
1805         (open_shared): Take name parameter as WCHAR.  Accommodate throughout.
1806         * shared_info.h ((CURR_SHARED_MAGIC): Redefine.
1807         (shared_name): Add declaration for function taking a WCHAR name.
1808         (open_shared): Change declaration according to above change.
1809         * pinfo.cc (pinfo::init) : Accommodate above change.
1810
1811 2009-01-26  Corinna Vinschen  <corinna@vinschen.de>
1812
1813         * grp.cc (getgrgid_r): Simplify code by using stpcpy.
1814         (getgrnam_r): Ditto.
1815         * passwd.cc (getpwuid_r32): Simplify code by using stpcpy.
1816         (getpwnam_r): Ditto.
1817
1818 2009-01-26  Corinna Vinschen  <corinna@vinschen.de>
1819
1820         * uinfo.cc (pwdgrp::load): Open file with FILE_OPEN_FOR_BACKUP_INTENT
1821         flag.
1822
1823 2009-01-24  Corinna Vinschen  <corinna@vinschen.de>
1824
1825         * mount.cc (mount_info::from_fstab): Open fstab file with
1826         FILE_OPEN_FOR_BACKUP_INTENT flag.
1827
1828 2009-01-23  Corinna Vinschen  <corinna@vinschen.de>
1829
1830         * smallprint.cc (__small_vsprintf): Use already available buffer tmp
1831         in wfillin case.
1832
1833 2009-01-22  Christopher Faylor  <me+cygwin@cgf.cx>
1834
1835         * select.cc (peek_serial): Add hack to allow proper operation with
1836         com0com driver.
1837
1838 2009-01-21  Corinna Vinschen  <corinna@vinschen.de>
1839
1840         Remove USE_SERVER define.  Accommodate throughout.
1841         * configure.in: Remove --enable-server option.
1842         * configure: Regenerate.
1843         * environ.cc: Remove CYGWIN=server setting.
1844
1845 2009-01-20  Corinna Vinschen  <corinna@vinschen.de>
1846
1847         * fhandler_procnet.cc: Reorganize global procnet content data into a
1848         new struct virt_tab_t.  Accommodate throughout.
1849
1850         * fhandler.h: Fix copyright dates.
1851         * fhandler_process.cc: Ditto.
1852         * fhandler_registry.cc: Ditto.
1853
1854 2009-01-20  Corinna Vinschen  <corinna@vinschen.de>
1855
1856         * devices.h (FH_PROCESSFD): New device type.
1857         * dtable.cc (build_fh_pc): Add case for FH_PROCESSFD.
1858         * fhandler.h (class fhandler_virtual): Drop bufalloc member.
1859         * fhandler_virtual.h: New header.
1860         * fhandler_proc.cc: Remove types proc_type_t and proc_tab_t in favor
1861         of types virt_type_t and virt_tab_t from fhandler_virtual.h.
1862         Change prototypes of format_XXX functions accordingly.
1863         (proc_tab): Drop size member info.
1864         (fhandler_proc::fill_filebuf): Don't allocate filebuf here.  Allocate
1865         it in the format_XXX functions.
1866         * fhandler_process.cc: Reorganize global process content data into a
1867         new struct virt_tab_t.  Accommodate throughout.
1868         (format_process_winexename): New function.
1869         (format_process_winpid): New function.
1870         (format_process_exename): New function.
1871         (format_process_root): New function.
1872         (format_process_cwd): New function.
1873         (format_process_cmdline): New function.
1874         (format_process_ppid): New function.
1875         (format_process_uid): New function.
1876         (format_process_pgid): New function.
1877         (format_process_sid): New function.
1878         (format_process_gid): New function.
1879         (format_process_ctty): New function.
1880         (format_process_fd): New function.
1881         * fhandler_procnet.cc (fhandler_procnet::fill_filebuf): Don't use
1882         bufalloc.
1883         * fhandler_registry.cc (fhandler_registry::fill_filebuf): Define
1884         bufalloc locally.
1885         * fhandler_virtual.cc (fhandler_virtual::fhandler_virtual): Drop
1886         initialization of bufalloc.
1887         (fhandler_virtual::dup): Drop copying bufalloc.
1888
1889 2009-01-20  Corinna Vinschen  <corinna@vinschen.de>
1890
1891         * thread.h (struct pthread_rwlock::RWLOCK_READER): Add counter n.
1892         * thread.cc (pthread_rwlock::rdlock): If a thread already owns a
1893         read lock, just count the number of locks for it, per SUSv4.
1894         (pthread_rwlock::tryrdlock): Ditto.
1895         (pthread_rwlock::unlock): If a thread has more than one concurrent
1896         read locks, just count down.
1897
1898 2009-01-20  Corinna Vinschen  <corinna@vinschen.de>
1899
1900         * autoload.cc (WSAIoctl): Reintroduce.
1901         (WSASendMsg): Define.
1902         * fhandler.h (class fhandler_socket): Change definition of recv_internal
1903         and send_internal to take WSAMSG pointer as parameter.
1904         * fhandler_socket.cc (WSAID_WSARECVMSG): Define.
1905         (LPFN_WSARECVMSG): Define.
1906         (WSASendMsg): Declare.
1907         (get_ext_funcptr): New function to fetch address of WSARecvMsg.
1908         (fhandler_socket::recv_internal): Take just a LPWSAMSG parameter.
1909         Change code accordingly.  If control information is requested,
1910         fetch address of WSARecvMsg and use that instead of WSARecvFrom.
1911         (fhandler_socket::recvfrom): Change return type to ssize_t as
1912         declared in fhandler.h.  Accommodate changes to recv_internal.
1913         (fhandler_socket::recvmsg): Ditto.  Make sure that control information
1914         is only requested if system, address family, and socket type support it.
1915         (fhandler_socket::send_internal): Take just a LPWSAMSG parameter
1916         and the flags.  Change code accordingly.  If control information is
1917         provided, use WSASendMsg instead of WSASendTo.
1918         (fhandler_socket::sendto): Drop useless comment.  Accommodate changes
1919         to send_internal.
1920         (fhandler_socket::sendmsg): Ditto.  Make sure that control information
1921         is only provided if system, address family, and socket type support it.
1922         * wincap.h (wincaps::has_recvmsg): New element.
1923         (wincaps::has_sendmsg): New element
1924         * wincap.cc: Implement above elements throughout.
1925         * include/cygwin/socket.h (CMSG_ALIGN): Phrase in terms of alignment
1926         of type struct cmsghdr.
1927
1928 2009-01-17  Corinna Vinschen  <corinna@vinschen.de>
1929
1930         * mmap.cc (mmap64): Fix condition checking if anonymous mapping beyond
1931         EOF is required.
1932
1933 2009-01-17  Corinna Vinschen  <corinna@vinschen.de>
1934
1935         * fhandler_proc.cc: Reorganize global proc content data into a new
1936         struct proc_tab_t.  Accommodate throughout.
1937         (format_proc_version): New function.
1938         (format_proc_loadavg): New function.
1939         (format_proc_self): New function.
1940
1941         * resource.cc (getrlimit): Return correct rlim_max value for
1942         RLIMIT_NOFILE.
1943
1944 2009-01-16  Corinna Vinschen  <corinna@vinschen.de>
1945
1946         * Fix copyright dates.
1947
1948 2009-01-13  Corinna Vinschen  <corinna@vinschen.de>
1949
1950         * libc/getopt.c (parse_long_options): Use fix from NetBSD's getopt
1951         to avoid false ambiguities.
1952
1953 2009-01-12  Corinna Vinschen  <corinna@vinschen.de>
1954
1955         * syscalls.cc (enum bin_status): New type.
1956         (try_to_bin): Return bin_status.  Rename win32_path to pc.  Rename h
1957         to fh.  Rename fh to tmp_fh.  Add code to set delete dispostion and
1958         more code to replace file moved to bin by another, temporary file.
1959         Add comments to explain why.
1960         (unlink_nt): Replace move_to_bin with bin_stat.  Only set bin_stat
1961         to move_to_bin for non-remote files.  As a last resort, call try_to_bin
1962         if setting delete-on-close failed.  Only re-set R/O DOS attribute
1963         and only close handle if it's still valid.
1964
1965 2009-01-11  Corinna Vinschen  <corinna@vinschen.de>
1966
1967         * errno.cc (errmap): Set errno to ENOENT instead of ENOSHARE throughout.
1968         * path.cc (path_conv::check): Set to and check for ENOENT instead of
1969         ENOSHARE.
1970
1971         * path.cc (symlink_info::check): Fix Samba 3.2.x comment.
1972
1973 2009-01-09  Corinna Vinschen  <corinna@vinschen.de>
1974
1975         * mount.cc (mount_info::from_fstab_line): Always convert drive
1976         letter in native path to uppercase.
1977         * path.cc (normalize_win32_path): Ditto.
1978         (path_prefix_p): Revert previous patch.
1979
1980         * path.cc (symlink_info::check): Check for STATUS_INVALID_PARAMETER
1981         return code to circumvent weird behaviour of Samba 3.2.x shares.
1982
1983 2009-01-09  Christopher Faylor  <me+cygwin@cgf.cx>
1984
1985         * include/sys/cygwin.h (CW_SETERRNO): Define.
1986         * external.cc (CW_SETERRNO): Implement.
1987         * include/cygwin/version.h: Bump CYGWIN_VERSION_API_MINOR to 192 to
1988         reflect the above change.
1989
1990         * path.cc (path_prefix_p): Treat X: as equivalent to x:.
1991
1992         * mkglobals_h: Remove unneeded #define.
1993
1994         * spawn.cc (spawn_guts): Avoid overly wordy initialization to zero.
1995
1996 2009-01-08  Corinna Vinschen  <corinna@vinschen.de>
1997
1998         * libc/fts.c (fts_build): Use DT_DIR case on Cygwin.
1999         (fts_ufslinks): Fix using wrong structure member in Cygwin-specific
2000         code.
2001
2002 2009-01-07  Corinna Vinschen  <corinna@vinschen.de>
2003
2004         * ntdll.h: Reorder NT status flags.  Fix a case difference. Add
2005         STATUS_CANNOT_DELETE flag.
2006         * syscalls.cc (unlink_nt): Change initial NtOpenFile to request
2007         FILE_SHARE_DELETE sharing mode.  Change comment accordingly.
2008         If setting delete disposition failed with STATUS_CANNOT_DELETE, try
2009         to delete using delete-on-close.  Explain why.
2010         Rearrange setting R/O DOS attribute after trying to delete.  Simplify
2011         comment.
2012
2013 2009-01-07  Corinna Vinschen  <corinna@vinschen.de>
2014
2015         * fhandler_disk_file.cc (fhandler_disk_file::link): Only add .exe if
2016         original file has .exe as well.
2017         * path.cc (path_conv::is_binary): Only recognize Windows 32 and 64 bit
2018         apps as binaries.
2019
2020 2009-01-02  Christopher Faylor  <me+cygwin@cgf.cx>
2021
2022         Remove unneeded header files from source files throughout.
2023         Update copyrights where appropriate.
2024
2025         * globals.cc: New file for generic global variables.
2026         * mkglobals_h: New script to generate globals.h.
2027         * mkstatic: New script used to build a (currently non-working) static
2028         libcygwin_s.a.
2029         * Makefile.in: Add unused rule to build a non-working libcygwin_s.a.
2030         (DLL_OFILES): Add globals.o.  Make all objects rely on globals.h.
2031         (globals.h): New target.  Generate globals.h.
2032         * cygtls.h: Honor new CYGTLS_HANDLE define to control when the HANDLE
2033         operator is allowed in _cygtls.
2034         * dcrt0.cc: Move most globals to globals.cc.
2035         * init.cc: Ditto.
2036         * environ.cc (strip_title_path): Remove now-unneeded extern.
2037         * fhandler_serial.cc (fhandler_serial::open): Ditto.
2038         * pinfo.cc: Ditto.
2039         (commune_process): Ditto.
2040         * shared.cc: Ditto.
2041         * glob.cc: Ditto.
2042         * strace.cc: Ditto.
2043         * exceptions.cc: Define CYGTLS_HANDLE before including winsup.h.
2044         * path.cc (stat_suffixes): Move here.
2045         * security.h: Add forward class path_conv declaration.
2046         * smallprint.cc (__small_vsprintf): Make a true c++ function.
2047         (__small_sprintf): Ditto.
2048         (small_printf): Ditto.
2049         (console_printf): Ditto.
2050         (__small_vswprintf): Ditto.
2051         (__small_swprintf): Ditto.
2052         * spawn.cc (spawn_guts): Remove _stdcall decoration in favor of
2053         regparm.
2054         (hExeced): Move to globals.cc
2055         * strfuncs.cc (current_codepage): Ditto.
2056         (active_codepage): Ditto.
2057         * sync.cc (lock_process::locker): Move here from dcrt0.cc.
2058         * syscalls.cc (stat_suffixes): Move to path.cc.
2059         * tty.cc (tty::create_master): Uncapitalize fatal warning for
2060         consistency.
2061         * winsup.h: Include globals.h to declare most of the grab bag list of
2062         globals which were previously defined here.
2063
2064         * mount.h: Move USER_* defines back to shared_info.h.
2065
2066         * speclib: Force temporary directory cleanup.
2067
2068 2009-01-02  Christopher Faylor  <me+cygwin@cgf.cx>
2069
2070         * speclib: Rewrite completely in perl.  Avoid multiple nm calls.