OSDN Git Service

* spawn.cc (spawn_guts): Don't run additional check for Win32
[pf3gnuchains/pf3gnuchains3x.git] / winsup / cygwin / ChangeLog
1 2009-06-22  Corinna Vinschen  <corinna@vinschen.de>
2
3         * spawn.cc (spawn_guts): Don't run additional check for Win32
4         incompatible CWD if newargv.fixup bailed out already.
5         (av::fixup): Check shell scripts for executability.
6
7 2009-06-18  Corinna Vinschen  <corinna@vinschen.de>
8
9         * path.cc (chdir): Check error conditions first.
10
11 2009-06-17  Corinna Vinschen  <corinna@vinschen.de>
12
13         * fhandler_socket.cc (fhandler_socket::recv_internal): Mark WSARecvMsg
14         as NO_COPY.
15
16 2009-06-16  Christopher Faylor  <me+cygwin@cgf.cx>
17
18         * fhandler.cc (fhandler_base::read_overlapped): Use a better variable
19         name.
20
21 2009-06-16  Christopher Faylor  <me+cygwin@cgf.cx>
22
23         * fhandler.cc (fhandler_base::read_overlapped): Preserve len when
24         looping due to received signal.
25
26 2009-06-15  Corinna Vinschen  <corinna@vinschen.de>
27
28         * net.cc (get_flags): New static function to generate interface flags
29         value.
30         (get_ipv4fromreg_ipcnt): New static function to fetch number of
31         configured IPv4 addresses for a given NIC from registry.
32         (get_ipv4fromreg): New static function to fetch configured IPv4
33         addresses for a given NIC from registry.
34         (get_friendlyname): New static function to generate friendly name.
35         (get_hwaddr): New static function to copy hardware address.
36         (get_xp_ifs): Restructure slightly.  Add code to generate IPv4 entries
37         entries for interfaces which are disconnected.
38
39 2009-06-14  Christopher Faylor  <me+cygwin@cgf.cx>
40
41         * errno.cc (errmap): Add mapping for ERROR_IO_INCOMPLETE.
42         * fhandler.cc (fhandler_base::fcntl): Fix comment.
43         (fhandler_base::wait_overlapped): Accept an optional len parameter.
44         Use the len parameter when WriteFile fails with ERROR_IO_PENDING.  Make
45         debug output less alarming.
46         (fhandler_base::write_overlapped): Pass len to wait_overlapped.
47         * fhandler.h (fhandler_base::wait_overlapped): Add an optional argument
48         denoting the number of characters intended to be written.
49
50         * fhandler_tty.cc (fhandler_pty_master::close): Don't close archetype
51         handles when cygwin is still initializing since the handles aren't
52         actually opened at that point.
53
54 2009-06-14  Corinna Vinschen  <corinna@vinschen.de>
55
56         * localtime.cc (time2): Take another stab at fixing a compiler warning.
57
58 2009-06-14  Christopher Faylor  <me+cygwin@cgf.cx>
59
60         * localtime.cc (time2): Take a stab at fixing a compiler warning.
61
62 2009-06-14  Christopher Faylor  <me+cygwin@cgf.cx>
63
64         * fhandler.cc (fhandler_base::wait_overlapped): Honor nonblocking flag
65         for writes.  Don't reset event handle when we see a ERROR_IO_PENDING.
66
67         * sigproc.cc (stopped_or_terminated): Use bool constants for
68         consistency.
69
70         * wait.cc (wait4): Remove nonsensical comment.
71
72 2009-06-13  Corinna Vinschen  <corinna@vinschen.de>
73
74         * fhandler_socket.cc (fhandler_socket::recv_internal): Set namelen
75         pointer to NULL if name pointer is NULL.  Explain why.
76
77 2009-06-12  Corinna Vinschen  <corinna@vinschen.de>
78
79         * localtime.cc (time2): Change "spring gap" to "spring forward gap"
80         in comment.
81
82 2009-06-12  Corinna Vinschen  <corinna@vinschen.de>
83
84         * localtime.cc (time2): Add workaround for spring forward gap problem.
85         Add explaining comment.
86
87 2009-06-12  Corinna Vinschen  <corinna@vinschen.de>
88
89         * Makefile.in (SUBLIBS): Add librt.a.
90         (librt.a): New rule to build librt.a.
91
92 2009-06-12  Corinna Vinschen  <corinna@vinschen.de>
93
94         * posix_ipc.cc (check_path): Fix typo in comment.  Align naming
95         convention rules to Linux.  Handle backslash same as slash.  Add
96         comment.
97
98 2009-06-09  Corinna Vinschen  <corinna@vinschen.de>
99
100         * autoload.cc (GetSystemTimes): Remove.
101         * fhandler_proc.cc (format_proc_uptime): Use global system_info rather
102         than retrieving a local copy of the SYSTEM_INFO.  Drop call to
103         GetSystemTimes and retrieve SystemPerformanceInformation on all systems
104         again with buffer size big enough for 64 bit systems.
105         (format_proc_stat): Use global system_info rather than retrieving a
106         local copy of the SYSTEM_INFO.  Retrieve SystemPerformanceInformation
107         with buffer size big enough for 64 bit systems.
108
109 2009-06-08  Corinna Vinschen  <corinna@vinschen.de>
110
111         * autoload.cc (GetSystemTimes): Define.
112         * fhandler_proc.cc (format_proc_uptime): Use GetSystemInfo to retrieve
113         processor count.  Use GetSystemTimes when available to retrieve system
114         idle time.  Improve debug output.
115         (format_proc_stat): Use GetSystemInfo to retrieve processor
116         count.  Improve debug output.  Ignore if SystemPerformanceInformation
117         returns error.  Explain why.
118
119 2009-06-08  Corinna Vinschen  <corinna@vinschen.de>
120
121         * fork.cc (frok::parent): Remove ancient code erroneously flushing
122         stdout.
123
124 2009-06-08  Corinna Vinschen  <corinna@vinschen.de>
125
126         * cygerrno.h (save_errno::~save_errno): Set errno directly to avoid
127         flooding debug output.
128
129 2009-06-08  Corinna Vinschen  <corinna@vinschen.de>
130
131         * path.cc (symlink_info::check): Return with error set to ENOENT if
132         STATUS_NO_MEDIA_IN_DEVICE is returned.
133
134 2009-06-07  Christopher Faylor  <me+cygwin@cgf.cx>
135
136         * cygheap.h (mini_cygheap): New struct.
137         (init_cygheap): Inherit locale field via mini_cygheap.
138         * cygheap.cc (cygheap_at_start): Define new variable.
139         (cygheap): Initialize as cygheap_at_start so that locale information is
140         always available.
141         (cygheap_init): Initialize cygheap iff it is set to cygheap_at_start.
142         * shared_info.h (memory_init): Accommodate argument change.
143         * memory.cc (memory_init): Accept an argument indicating whether
144         cygheap should be initialized or not.
145         * dcrt0.cc (child_info_fork::handle_fork): Pass false to memory_init().
146         (child_info_spawn::handle_spawn): Ditto.
147         (dll_crt0_0): Pass true to memory_init when not forking or execing.
148
149         * cygheap.h (cygheap_types::HEAP_2_DLL): New enum.
150         * dll_init.h (dll): Remove unused namelen field.
151         (dll_list::load_after_fork): Accommodate change in arguments.
152         * dll_init.cc (dll_list::alloc): Allocate dll information in the cygwin
153         heap.
154         (dll_list::detach): Free dll information from the cygwin heap.
155         (dll_list::load_after_fork): Use dll information in the cygwin heap
156         directly rather than querying parent.
157         * fork.cc (frok::first_dll): Delete.
158         (frok::child): Don't report on first_dll.  Don't pass it to
159         load_on_fork.
160         (frok::parent): Don't set first_dll.
161         (fork): Ditto.
162
163 2009-06-06  Corinna Vinschen  <corinna@vinschen.de>
164
165         * dll_init.cc (dll_list::alloc): Allocate memory using a section
166         object.  Explain why.  Drop call to GetSystemInfo, rather call
167         getpagesize to get allocation granularity.  Only align to allocation
168         granularity under WOW64.  Use roundup2 to align.
169         (dll_list::detach): Call NtUnmapViewOfSection instead of VirtualFree.
170
171 2009-06-06  Corinna Vinschen  <corinna@vinschen.de>
172
173         * mmap.cc: Use NtUnmapViewOfSection instead of UnmapViewOfFile
174         throughout for symmetry.
175         (fhandler_dev_mem::munmap): Use correct process handle in call to
176         NtUnmapViewOfSection.
177
178 2009-06-06  Corinna Vinschen  <corinna@vinschen.de>
179
180         * dll_init.h (struct dll): Set size of name element to ANYSIZE_ARRAY.
181         * dll_init.cc: Fix formatting.
182         (dll_list::alloc): Only allocate as much memory for struct dll as
183         necessary for given DLL name.
184         (dll_list::load_after_fork): Only read a single page of parent memory.
185         Only read more if namelen indicates that it's necessary.
186
187 2009-06-05  Dave Korn  <dave.korn.cygwin@gmail.com>
188
189         * winbase.h (ilockexch):  Fix asm constraints.
190         (ilockcmpexch):  Likewise.
191
192 2009-06-05  Corinna Vinschen  <corinna@vinschen.de>
193
194         * heap.cc (heap_init): Fix typo in comment.
195
196 2009-06-04  Corinna Vinschen  <corinna@vinschen.de>
197
198         * fhandler_clipboard.cc: Avoid calling system_printf.
199         (set_clipboard): Add basic error checking.  Set errno here.  Per MSDN,
200         don't call GlobalFree on data block transferred to clipboard. 
201         (fhandler_dev_clipboard::write): Drop setting errno after call to
202         set_clipboard.
203         (fhandler_dev_clipboard::read): Add basic error checking. Simplify code.
204
205 2009-06-04  Corinna Vinschen  <corinna@vinschen.de>
206
207         * fhandler_console.cc (set_console_title): Convert title string to
208         wchar_t and call SetConsoleTitleW.
209
210 2009-06-04  Corinna Vinschen  <corinna@vinschen.de>
211
212         * fhandler_console.cc (fhandler_console::read): Allow Ctrl-Space to
213         emit a NUL byte.
214
215 2009-06-04  Dave Korn  <dave.korn.cygwin@gmail.com>
216
217         * thread.cc (__cygwin_lock_lock):  Delete racy optimisation.
218         (__cygwin_lock_unlock):  Likewise.
219
220 2009-06-03  IWAMURO Motnori  <deenheart@gmail.com>
221
222         * strfuncs.cc (sys_cp_mbstowcs): Fix condition.
223
224 2009-06-03  Corinna Vinschen  <corinna@vinschen.de>
225
226         * strfuncs.cc (sys_cp_wcstombs): Implement reverse functionality
227         of the change to sys_cp_mbstowcs from 2009-05-30.
228         (sys_cp_mbstowcs): Slightly reformat.  Fix comment to accommodate
229         change to sys_cp_wcstombs.  Don't write to *ptr if dst is NULL.
230
231 2009-06-03  Corinna Vinschen  <corinna@vinschen.de>
232
233         * fhandler_console.cc (fhandler_console::read): Convert Alt-Backspace
234         to \033\177 or to \377 dependent on the setting of dev_state->metabit.
235
236 2009-06-02  Corinna Vinschen  <corinna@vinschen.de>
237
238         * path.cc (path_conv::check): Don't call set_exec for files on "noacl"
239         mount points.
240
241 2009-05-30  Christopher Faylor  <me+cygwin@cgf.cx>
242
243         * strfuncs.cc (sys_cp_mbstowcs): Treat src as unsigned char *.  Convert
244         failure of f_mbtowc into a single malformed utf-16 value.
245
246 2009-05-30  Christopher Faylor  <me+cygwin@cgf.cx>
247
248         * cygwin/include/sys/termios.h: Make default erase character "^?".
249
250 2009-05-30  Christopher Faylor  <me+cygwin@cgf.cx>
251
252         * fhandler_console.cc (fhandler_console::read): Convert backspace key
253         to DEL.
254
255 2009-05-29  Christopher Faylor  <me+cygwin@cgf.cx>
256
257         * path.cc (cwdstuff::set): Rewrite previous change to properly test the
258         end of the buffer.
259
260 2009-05-28  Christopher Faylor  <me+cygwin@cgf.cx>
261
262         * path.cc (cwdstuff::set): Avoid removing a nonexistent trailing slash.
263
264 2009-05-20  Eric Blake  <ebb9@byu.net>
265
266         * net.cc (gethostby_helper): Use correct signedness.
267
268 2009-05-18  Christopher Faylor  <me+cygwin@cgf.cx>
269
270         * mount.cc (mount_info::add_item): Avoid using any-old '/' as
271         indicating root.
272
273 2009-05-18  Christopher Faylor  <me+cygwin@cgf.cx>
274
275         * mount.cc (mount_info::got_usr_bin): Mark as NO_COPY.
276         (mount_info::got_usr_lib): Ditto.
277         (mount_info::root_idx): Ditto.
278
279 2009-05-14  Corinna Vinschen  <corinna@vinschen.de>
280
281         * wchar.h (sys_mbstowcs): Add missing __stdcall attribute.
282
283 2009-05-14  Corinna Vinschen  <corinna@vinschen.de>
284
285         * cygheap.cc (cygheap_init): Set Cygwin default locale values.
286         * cygheap.h (struct cygheap_locale): New structure.
287         (struct user_heap_info): Add cygheap_locale member locale.
288         * dcrt0.cc (dll_crt0_1): Revert to calling _setlocale_r so that only
289         the applications locale is reverted to "C".
290         * environ.cc (environ_init): Remove unused got_lc variable.
291         * fhandler.h (class dev_console): Remove now unsed locale variables.
292         * fhandler_console.cc (fhandler_console::get_tty_stuff): Remove
293         setting dev_console's locale members.
294         (dev_console::con_to_str): Use internal locale settings.  Default to
295         __ascii_wctomb if charset is "ASCII".
296         (fhandler_console::write_normal): Ditto.
297         * strfuncs.cc (__ascii_wctomb): Drop declaration.
298         (__db_wctomb): Use fixed value 2 instead of not
299         necessarily matching MB_CUR_MAX.
300         (__eucjp_wctomb): Use 3 instead of MB_CUR_MAX.
301         (sys_cp_wcstombs): Remove special case for "C" locale.
302         (sys_wcstombs): Implement here.  Use internal locale data stored on
303         cygheap.
304         (sys_cp_mbstowcs): Remove special case for "C" locale.
305         (sys_mbstowcs): Implement here.  Use internal locale data stored on
306         cygheap.
307         * syscalls.cc (internal_setlocale): New function to set cygheap locale
308         data and to reset CWD posix path.
309         (setlocale): Just call internal_setlocale from here if necessary.
310         * wchar.h (__ascii_wctomb): Declare.
311         (sys_wcstombs): Don't define inline, just declare.
312         (sys_mbstowcs): Ditto.
313
314 2009-05-14  Christopher Faylor  <me+cygwin@cgf.cx>
315
316         * mount.cc (mount_info::init): Remove MOUNT_CYGWIN_EXEC setting when
317         auto-mounting /usr/bin.
318
319 2009-05-14  Corinna Vinschen  <corinna@vinschen.de>
320
321         * mount.cc (oopts): Add a no-op "auto" option.
322         (mount_info::create_root_entry): Set root dir to MOUNT_IMMUTABLE rather
323         than to MOUNT_OVERRIDE.
324
325 2009-05-13  Corinna Vinschen  <corinna@vinschen.de>
326             Christopher Faylor  <me+cygwin@cgf.cx>
327
328         * mount.cc (mount_info::got_usr_bin): Define.
329         (mount_info::got_usr_lib): Ditto.
330         (mount_info::root_idx): Ditto.
331         (mount_info::create_root_entry): Create root entry as immutable and
332         flag as automatic.
333         (mount_info::init): Remove "Huh?  No /etc/fstab..." warning.
334         Unconditionally call from_fstab for user and system tables.  Fill in
335         /usr/bin and /usr/lib if they have not been specified in /etc/fstab.
336         (oopts): Alphabetize.  Add "override" option to allow overriding
337         immutable mount points.
338         (mount_info::add_item): Accommodate new MOUNT_IMMUTABLE flag intended
339         for root mount.
340         (mount_info::add_item): Detect "/usr/bin", "/usr/lib", and "/" and set
341         appropriate global state.
342         (fillout_mntent): Add ,auto to mount points added by Cygwin DLL.
343         (mount): Remove masking of MOUNT_SYSTEM.  Allow user to shoot
344         themselves.  Add comment.
345         * mount.h (mount_info::got_usr_bin): Declare.
346         (mount_info::got_usr_lib): Ditto.
347         (mount_info::root_idx): Ditto.
348         * include/sys/mount.h: Reformat enum.
349         Add MOUNT_{OVERRIDE,IMMUTABLE,AUTOMATIC}.
350
351 2009-05-13  Corinna Vinschen  <corinna@vinschen.de>
352
353         * cygheap.h (cwdstuff): Convert to class.  Make posix and dir private.
354         (cwdstuff::get_posix): New method.
355         (cwdstuff::reset_posix): New method.
356         * dcrt0.cc (dll_crt0_1): Call setlocale rather than _setlocale_r.
357         * environ.cc (environ_init): Ditto.  Prefer "C" locale over current
358         codepage default locale.
359         * path.cc (chdir): Use cwdstuff::get_posix method instead of accessing
360         cwdstuff::posix directly.
361         (cwdstuff::set): Defer creating posix path to first usage.
362         (cwdstuff::get_posix): Create posix path if it's empty, and return it.
363         (cwdstuff::get): Create posix path if it's empty.
364         * strfuncs.cc (sys_cp_wcstombs): Use UTF-8 conversion in the "C"
365         locale.
366         (sys_cp_mbstowcs): Ditto.
367         * syscalls.cc (gen_full_path_at): Fetch CWD posix path locked.
368         (setlocale): Implement here.  Reset CWD posix path.
369
370 2009-05-09  Christopher Faylor  <me+cygwin@cgf.cx>
371
372         * cygwin/version.h (CYGWIN_VERSION_CYGWIN_CONV): New define.
373
374 2009-05-09  Corinna Vinschen  <corinna@vinschen.de>
375
376         * dtable.cc (dtable::init_std_file_from_handle): Add workaround for
377         Windows 7 64 bit issue.  Add lengthy comment to explain what happens.
378         * wincap.h (wincaps::has_console_handle_problem): New element.
379         * wincap.cc: Implement above element throughout.
380         (wincap_7): New wincaps structure for NT 6.1 kernels.
381         (wincapc::init): Set has_console_handle_problem to false for 32 bit
382         systems.
383
384 2009-05-09  Corinna Vinschen  <corinna@vinschen.de>
385
386         * sec_auth.cc (str2uni_cat): Move from here...
387         * path.cc (str2uni_cat): ...to here.  Simplify.  Make static inline.
388         (get_nt_native_path): Use RtlAppendUnicodeToString rather than
389         str2uni_cat for constant strings for speed.
390         * security.h (str2uni_cat): Drop declaration.
391
392 2009-05-08  Corinna Vinschen  <corinna@vinschen.de>
393             IWAMURO Motonori <deenheart@gmail.com>
394
395         * strfuncs.cc (sys_cp_wcstombs): save and restore previous errno value.
396         (sys_cp_mbstowcs): Ditto.
397
398 2009-05-08  IWAMURO Motonori <deenheart@gmail.com>
399
400         * strfuncs.cc (sys_cp_wcstombs): Set errno to 0 before converting
401         wide char to SO/UTF-8 sequence.
402
403 2009-05-08  Corinna Vinschen  <corinna@vinschen.de>
404
405         * include/sys/select.h: Guard definitions with __USE_W32_SOCKETS as
406         the accompanying fd_set definitions in newlib's sys/types.h.
407
408 2009-05-06  Christopher Faylor  <me+cygwin@cgf.cx>
409
410         * fhandler_console.cc (fhandler_console::ioctl): Properly treat
411         TIOCLINUX argument as a char.
412         * fhandler_tty.cc (fhandler_tty_slave::ioctl): Use coercion to properly
413         set char value.
414
415 2009-05-06  Corinna Vinschen  <corinna@vinschen.de>
416
417         * libc/minires.c (scanline): Fix type in calls to ctype functions
418         to stay in unsigned char range for char values >= 0x80.
419         * regex/regcomp.c: Ditto, throughout.
420         * regex/regex2.h (ISWORD): Ditto.
421
422 2009-05-06  Corinna Vinschen  <corinna@vinschen.de>
423
424         * cygheap.cc (cygheap_init): Set umask to a sane default.
425         * uinfo.cc (cygheap_user::ontherange): Don't use HOMEDRIVE/HOMEPATH
426         to set HOME.  Default to /home/USERNAME.
427
428 2009-05-03  Corinna Vinschen  <corinna@vinschen.de>
429
430         * security.cc (set_file_sd): Drop using FILE_OPEN_FOR_RECOVERY flag in
431         call to NtOpenFile.
432         * exceptions.cc (open_stackdumpfile): Ditto in call to NtCreateFile.
433         * fhandler.cc (fhandler_base::open): Ditto.  Simplify setting
434         create_options.
435
436         * mount.cc (fs_info::update): Recognize offline storage.
437         (fillout_mntent): Report UDF and offline storage.
438         * mount.h (class fs_info): Add is_csc_cache status flag.
439
440 2009-05-04  Christopher Faylor  <me+cygwin@cgf.cx>
441
442         * fhandler_console.cc (fhandler_console::write_console): Eliminate
443         unneeded debugging output.
444         (fhandler_console::write_normal): Eliminate unneeded __seterrno.
445
446 2009-05-04  Christopher Faylor  <me+cygwin@cgf.cx>
447
448         * libc/minires.c (scanline): Accommodate ctype changes which disallow
449         use of an unadorned char argument to is* macros.
450         * regex/regcomp.c: Ditto, throughout.
451         * regex/regex2.h (ISWORD): Ditto.
452
453 2009-05-03  Christopher Faylor  <me+cygwin@cgf.cx>
454
455         * fhandler.h (fhandler_console::MAX_WRITE_CHARS): Declare.
456         (fhandler_console::write_replacement_char): Declare as inline.
457         (fhandler_console::write_console): Declare new function.
458         * fhandler_console.cc (fhandler_console::MAX_WRITE_CHARS): Define.
459         (handler_console::write_console): Define.
460         (fhandler_console::write_replacement_char): Define as inline.
461         (fhandler_console::write_normal): Use write_console when writing
462         buffers of unknown length.
463
464 2009-04-26  Yaakov Selkowitz  <yselkowitz@users.sourceforge.net>
465
466         * include/cygwin/socket.h: Define SOL_IPV6.
467
468 2009-04-21  Corinna Vinschen  <corinna@vinschen.de>
469
470         * ctype.cc (__set_ctype): Copy exact part of the current active
471         character class array.
472
473 2009-04-20  Corinna Vinschen  <corinna@vinschen.de>
474
475         * flock.cc (lf_setlock): Handle border case which results in WFMO loop
476         exiting with ret == WAIT_TIMEOUT gracefully.  Add a system_printf to
477         uncover other potential problems with WFMO loop. 
478
479 2009-04-18  Christopher Faylor  <me+cygwin@cgf.cx>
480
481         * mkimport: Specify .text for stub explicitly.
482         * speclib: Add a dummy '.idata$7' section referring to the dll
483         associated with the real import library.
484
485 2009-04-18  Corinna Vinschen  <corinna@vinschen.de>
486
487         * dcrt0.cc (globify): Only call mbtowc for non-ascii chars.
488
489 2009-04-17  Corinna Vinschen  <corinna@vinschen.de>
490
491         * dcrt0.cc (globify): Make multibyte-aware.
492
493 2009-04-17  Corinna Vinschen  <corinna@vinschen.de>
494
495         * flock.cc (class inode_t): Add i_wait member and matching methods
496         wait(), unwait(), and waiting().
497         (inode_t::inode_t): Initialize i_wait to 0.
498         (fhandler_disk_file::lock): Only remove node if no other thread is
499         waiting for a blocking lock.
500         (lf_setlock): Manipulate node->i_wait to signal that a thread is
501         waiting for a blocking lock in this node.
502         (lf_findoverlap): Reinstantiate SELF test as in original code.
503
504 2009-04-16  Corinna Vinschen  <corinna@vinschen.de>
505
506         * dlfcn.cc (get_full_path_of_dll): Just return a bool value.  Drop
507         local path_conv in favor of getting it as parameter.  Add local string
508         buffer instead of getting it as parameter.
509         (dlopen): Accommodate get_full_path_of_dll change.  Fetch WCHAR Windows
510         path from path_conv variable and call LoadLibraryW.
511
512 2009-04-16  Corinna Vinschen  <corinna@vinschen.de>
513
514         * ntdll.h (STATUS_LOCK_NOT_GRANTED): Define.
515         * syscalls.cc (unlink_nt): Handle STATUS_LOCK_NOT_GRANTED same as
516         STATUS_SHARING_VIOLATION.  Add lengthy comment to explain why.
517
518 2009-04-15  Corinna Vinschen  <corinna@vinschen.de>
519
520         * path.cc (path_conv::get_wide_win32_path): Allow relative paths.
521         (cygwin_conv_path): In case of CCP_POSIX_TO_WIN_W, convert relative 
522         paths to absolute paths if the relative pathname length exceeds
523         MAX_PATH.
524
525 2009-04-15  Corinna Vinschen  <corinna@vinschen.de>
526
527         * libc/bsdlib.cc: Align copyright with upstream.
528         * libc/fnmatch.c: Ditto.
529         * libc/fts.c: Ditto.
530         * libc/inet_addr.c: Ditto.
531         * libc/inet_network.c: Ditto.
532         * libc/rcmd.cc: Ditto.
533         * libc/rexec.cc: Ditto.
534
535 2009-04-14  Christopher Faylor  <me+cygwin@cgf.cx>
536
537         * speclib: Really revert to using tempdir.
538
539 2009-04-14  Christopher Faylor  <me+cygwin@cgf.cx>
540
541         * speclib: Revert to using tempdir.
542
543 2009-04-14  Corinna Vinschen  <corinna@vinschen.de>
544
545         * localtime.cc (tzload): Implement setting __tzrule's offset member
546         using newlib's __gettzinfo () interface also when tzload returns
547         successfully.
548
549 2009-04-13  Dave Korn  <dave.korn.cygwin@gmail.com>
550
551         * include/stdint.h (intptr_t):  Remove long from type.
552         (uintptr_t):  Likewise.
553         (INTPTR_MIN):  Remove 'L' suffix.
554         (INTPTR_MAX, UINTPTR_MAX):  Likewise.
555
556 2009-04-12  Christopher Faylor  <me+cygwin@cgf.cx>
557
558         * speclib: Initial stab at cleaning up temp files.  More work needed.
559         * mkimport: Ditto.
560
561 2009-04-12  Christopher Faylor  <me+cygwin@cgf.cx>
562
563         * Makefile.in (clean): Clean globals.h.
564         (LIBCOS): Depend on globals.h.
565
566 2009-04-11  Christopher Faylor  <me+cygwin@cgf.cx>
567
568         * mkimport: New script to perform all operations necessary to create
569         libcygwin.a.
570         * rmsym: Delete.
571         * newsym: Delete.
572         * Makefile.in (toolopts): New variable which holds options relating to
573         binutils/gcc tools.
574         (speclib): Use toolopts.  Add symbols to avoid copying to special
575         libraries.
576         (OBSOLETE_FUNCTIONS): Delete.
577         (NEW_FUNCTIONS): Change to represent an argument to new mkimport
578         script.
579         (libcygwin.a): Use only new mkimport script to create libcygwin.a.
580         Only rely on ${LIBCOS}.
581         (*/lib*.a): Simplify speclib dependencies.
582         (speclib): Accept toolchain options.  Convert every argument to
583         absolute path.  Simplify parsing of nm output.  Accommodate new
584         exclude option.
585
586 2009-04-11  Dave Korn <dave.korn.cygwin@googlemail.com>
587
588         * include/stdint.h (INTPTR_MIN, INTPTR_MAX):  Add 'L' suffix.
589         (WINT_MAX):  Add 'U' suffix.
590
591 2009-04-10  Christopher Faylor  <me+cygwin@cgf.cx>
592
593         * speclib: Use a more robust method to derive full file path.
594
595 2009-04-09  Christopher Faylor  <me+cygwin@cgf.cx>
596
597         * speclib: Semi-revert to previous version but don't try to generate
598         well-formed import library.  Instead, just extract appropriate symbols
599         and let later libcygwin.a on link line fill in the rest of the import
600         stuff.
601         * gendef: Hopefully no-op modification to allow easier post-processing
602         on symbol values.
603
604 2009-04-09  Corinna Vinschen  <corinna@vinschen.de>
605
606         * syscalls.cc (try_to_bin): Use tmp_pathbuf buffer to allocate infobuf
607         rather than using the stack.
608
609 2009-04-09  Corinna Vinschen  <corinna@vinschen.de>
610
611         * syscalls.cc (try_to_bin): Fix alignment of infobuf.
612
613 2009-04-09  Corinna Vinschen  <corinna@vinschen.de>
614
615         * fhandler_disk_file.cc (fhandler_disk_file::fchown): Catch an
616         error when changing the user account on a standalone Samba server.
617         Explain why.
618         * sec_acl.cc (setacl): Accommodate additional parameter to set_file_sd.
619         * sec_helper.cc (SECURITY_SAMBA_UNIX_AUTHORITY): Define.
620         (well_known_samba_unix_user_fake_sid): Define.
621         * security.cc (set_file_sd): Take additional parameter if ownership
622         should be changed.  Restrict requested permissions accordingly.
623         (set_file_attribute): Accommodate additional parameter to set_file_sd.
624         * security.h (well_known_samba_unix_user_fake_sid): Declare.
625         (set_file_sd): Align declaration to above change.
626
627 2009-04-07  Corinna Vinschen  <corinna@vinschen.de>
628
629         * include/stdint.h (int_least32_t): Define as int.
630         (uint_least32_t): Ditto, unsigned.
631         (int_fast16_t): Define as int.
632         (int_fast32_t): Ditto.
633         (uint_fast16_t): Ditto, unsigned.
634         (uint_fast32_t): Ditto.
635         (UINT32_MAX): Remove `L' long marker.
636         (UINT_LEAST32_MAX): Ditto.
637         (UINT_FAST16_MAX): Ditto.
638         (UINT_FAST32_MAX): Ditto.
639         (INT32_C): Ditto.
640         (UINT32_C): Ditto.
641
642 2009-04-07  Corinna Vinschen  <corinna@vinschen.de>
643
644         * strfuncs.cc: Change WCHAR to wchar_t in multibyte<->widechar
645         conversion functions throughout.
646         * wchar.h: Ditto in declarations.  Guard them __INSIDE_CYGWIN__.
647
648 2009-04-07  Corinna Vinschen  <corinna@vinschen.de>
649
650         * fhandler.h (class dev_console): Add members con_mbtowc, con_wctomb,
651         and con_charset.
652         (dev_console::str_to_con): Take mbtowc function pointer and charset
653         as additional parameters.
654         * fhandler_console.cc (fhandler_console::get_tty_stuff): Initialize
655         aforementioned new members.  Explain why.
656         (dev_console::con_to_str): Remove useless comment.  Call new
657         sys_cp_wcstombs function rather than sys_wcstombs.
658         (dev_console::str_to_con): Take mbtowc function pointer and charset
659         as additional parameters.  Call sys_cp_mbstowcs accordingly.
660         (fhandler_console::write_normal): Only initialize f_mbtowc and charset
661         once.  Accommodate changed str_to_con.
662         * strfuncs.cc (sys_cp_wcstombs): Renamed from sys_wcstombs.  Take
663         wctomb function pointer and charset as parameters.  Use throughout.
664         (sys_cp_mbstowcs): Take wctomb function pointer and charset as
665         parameters instead of codepage.  Remove matching local variables and
666         their initialization.
667         * wchar.h (ENCODING_LEN): Define as in newlib.
668         (__mbtowc): Use mbtowc_p typedef for declaration.
669         (wctomb_f): New type.
670         (wctomb_p): New type.
671         (__wctomb): Declare.
672         (__utf8_wctomb): Use wctomb_f typedef for declaration.
673         (sys_cp_wcstombs): Move declaration from winsup.h here.
674         (sys_wcstombs): Ditto.
675         (sys_wcstombs_alloc): Ditto.
676         (sys_cp_mbstowcs): Ditto.
677         (sys_mbstowcs): Ditto.
678         (sys_mbstowcs_alloc): Ditto.
679         * winsup.h: Move declaration of sys_FOO functions to wchar.h.  Include
680         wchar.h instead.
681
682 2009-04-06  Earl Chew <earl_chew@agilent.com>
683
684         * libc/rexec.cc (ruserpass): Use fstat64 instead of fstat.
685
686 2009-04-06  Corinna Vinschen  <corinna@vinschen.de>
687
688         * strfuncs.cc: Add comment to explain why we can't support JIS
689         for now.
690         (__db_wctomb): Alwaus use WC_NO_BEST_FIT_CHARS.
691         (__jis_wctomb): Just call __ascii_wctomb from here.
692         (__eucjp_wctomb): Convert to standalone implementation to fix up the
693         difference between eucJP and CP 20932 affecting JIS-X-0212 characters.
694         Explain.
695         (__kr_wctomb): Use codepage 949.
696         (__db_mbtowc): Reorder code slightly.  Always use MB_ERR_INVALID_CHARS
697         in call to MultiByteToWideChar.  Fix a problem with singlebyte
698         sequences.  Fix a bug in '\0' handling.  Reset state->__count on
699         successful return from non-zero state.
700         (__jis_mbtowc): Just call __ascii_mbtowc from here.
701         (__eucjp_mbtowc): Convert to standalone implementation to fix up the
702         difference between eucJP and CP 20932 affecting JIS-X-0212 characters.
703         (__kr_mbtowc): Use codepage 949.
704         (__set_charset_from_codepage): Handle codepage 20932 as eucJP.
705
706 2009-04-05  Christopher Faylor  <me+cygwin@cgf.cx>
707
708         * Makefile.in: Use all compile options when calculating magic values.
709         * shared_info.h (CURR_SHARED_MAGIC): Revert erroneous value.
710         * child_info.h (CURR_CHILD_INFO_MAGIC): Update.
711
712         * fhandler.h (acquire_output_mutex): Remove unneeded ';'.
713         (release_output_mutex): Ditto.
714
715 2009-04-05  Christopher Faylor  <me+cygwin@cgf.cx>
716
717         * net.cc: Undefine NOERROR and DELETE to avoid compiler warnings.
718         * shared_info.h (CURR_SHARED_MAGIC): Update.
719         * spawn.cc (spawn_guts): Avoid copying one line command line argument
720         if it hasn't been filled out.
721
722 2009-04-04  Yaakov Selkowitz  <yselkowitz@users.sourceforge.net>
723             Corinna Vinschen  <corinna@vinschen.de>
724
725         * include/asm/byteorder.h (__ntohl): Prototype before define to avoid
726         a warning with -Wmissing-prototypes.  Use _ELIDABLE_INLINE macro from
727         _ansi.h.
728         (__ntohs): Ditto.
729
730 2009-04-02  Corinna Vinschen  <corinna@vinschen.de>
731
732         * environ.cc (build_env): Fix length calculation of resulting
733         wide char environment string.
734
735 2009-04-02  Yaakov Selkowitz  <yselkowitz@users.sourceforge.net>
736
737         * include/netdb.h: #include <inttypes.h>, <netinet/in.h>,
738         and <sys/socket.h> per SUSv3.
739
740 2009-04-01  Corinna Vinschen  <corinna@vinschen.de>
741
742         * strfuncs.cc (sys_cp_mbstowcs): Check if ASCII SO is followed by at
743         least two chars and the next byte is a valid UTF-8 start byte before
744         trying to convert the followup bytes as UTF-8 sequence.
745
746 2009-03-31  Corinna Vinschen  <corinna@vinschen.de>
747
748         * shm.cc (struct shm_attached_list): Convert access type to ULONG.
749         (fixup_shms_after_fork): Fix comment.  Use NtMapViewOfSection rather
750         than MapViewOfFileEx to recreate shared memory regions.  Add function
751         name to api_fatal output.
752         (shmat): Use NtMapViewOfSection to create shared memory region
753         top-down.
754
755 2009-03-31  Corinna Vinschen  <corinna@vinschen.de>
756
757         * ctype.cc: Remove implementation of ctype functions in favor of
758         pointer-based newlib implementation.
759         (_ctype_b): Declare.
760         (__ctype_cp): Move to newlib. Declare.
761         (__ctype_iso): Ditto.
762         (__set_ctype): Implement changing __ctype_ptr__.  Only copy character
763         class data in applications built under older Cygwin.
764         * cygwin.din (__ctype_ptr__): Export.
765         * include/ctype.h: Remove in favor of newlib implementation.
766         * include/cygwin/config.h (__EXPORT): Define alongside __IMPORT.
767         * include/cygwin/version.h (CYGWIN_VERSION_CHECK_FOR_OLD_CTYPE):
768         Define check for old vs. new ctype implementation.
769         Bump API minor number.
770
771 2009-03-28  Christopher Faylor  <me+cygwin@cgf.cx>
772
773         * Makefile.in: Perform some minor cleanup.  Revamp speclib handling.
774         * speclib: Rewrite to create libraries with dlltool rather than
775         attempting surgery on libcygwin.a.
776
777 2009-03-27  Corinna Vinschen  <corinna@vinschen.de>
778
779         * net.cc (inet_ntop6): Convert to lowercase hex digits on the fly.
780
781 2009-03-27  Corinna Vinschen  <corinna@vinschen.de>
782
783         * net.cc (cygwin_getaddrinfo): Check hints for non-NULL before
784         checking its content.
785
786 2009-03-27  Corinna Vinschen  <corinna@vinschen.de>
787
788         * fhandler.h (class fhandler_fifo): Rename read/write methods to
789         raw_read/raw_write.
790         * fhandler_fifo.cc: Ditto.
791
792 2009-03-27  Corinna Vinschen  <corinna@vinschen.de>
793
794         * syscalls.cc (pathconf): Fix memory leak.
795
796 2009-03-26  Corinna Vinschen  <corinna@vinschen.de>
797
798         * path.cc (symlink_worker): Write target filename as UTF-16 string
799         with leading BOM marker.
800         (symlink_info::check_shortcut): If check for leading BOM marker 
801         succeeds, read filename as UTF-16 string.
802         (symlink_info::check_sysfile): Ditto.
803
804 2009-03-26  Yaakov Selkowitz  <yselkowitz@users.sourceforge.net>
805
806         * include/asm/byteorder.h (__ntohl): Align definition to ISO C99.
807         (__ntohs): Ditto.
808
809 2009-03-26  Corinna Vinschen  <corinna@vinschen.de>
810
811         * strfuncs.cc (__set_charset_from_codepage): Revert to translating
812         codepage 936 to "GBK".
813
814 2009-03-25  Corinna Vinschen  <corinna@vinschen.de>
815
816         * strfuncs.cc (sys_wcstombs): Don't convert ASCII SO into two
817         ASCII SO's.
818
819 2009-03-25  Corinna Vinschen  <corinna@vinschen.de>
820
821         * environ.cc (environ_init): Break from locale loop after first hit.
822         * fhandler_console.cc (fhandler_console::write_normal): Print a SO
823         sequence using always valid Unicode chars.
824
825 2009-03-25  Corinna Vinschen  <corinna@vinschen.de>
826
827         * strfuncs.cc (__kr_wctomb): Use codepage 51949 rather than 50949.
828         (__kr_mbtowc): Ditto.
829         (__set_charset_from_codepage): Ditto.  Translate codepage 936 to
830         "GB2312" and drop the charset name "GBK".
831
832 2009-03-24  Corinna Vinschen  <corinna@vinschen.de>
833
834         * strfuncs.cc (__kr_wctomb): Use codepage 50949 rather than 949.
835         (__kr_mbtowc): Ditto.
836         (__set_charset_from_codepage): Translate codepages 949 and 50949 to
837         "EUCKR" and drop the charset name "CP949".
838
839 2009-03-24  Corinna Vinschen  <corinna@vinschen.de>
840
841         * strfuncs.cc (sys_cp_mbstowcs): Don't read beyond src + nms.
842
843 2009-03-24  Corinna Vinschen  <corinna@vinschen.de>
844
845         * shared_info.h (CURR_SHARED_MAGIC): Update.
846
847 2009-03-24  Corinna Vinschen  <corinna@vinschen.de>
848
849         * wchar.h: Replace UINT with unsigned int.
850
851 2009-03-24  Corinna Vinschen  <corinna@vinschen.de>
852
853         * wchar.h: Remove erroneous "C" specifier from extern declaration.
854
855 2009-03-24  Corinna Vinschen  <corinna@vinschen.de>
856
857         * ctype.cc (_CTYPE_DATA_0_127): Add _B class to TAB character.
858         (__ctype_default): New character class array for default ASCII
859         character set.
860         (__ctype_iso): New array of character class array for ISO charsets.
861         (__ctype_cp): Ditto for singlebyte Windows codepages.
862         (tolower): Implement as distinct function to support any singlebyte
863         charset.
864         (toupper): Ditto.
865         (__set_ctype): New function to copy singlebyte character classes
866         corresponding to current charset to ctype_b array.
867         Align copyright text to upstream.
868         * dcrt0.cc (dll_crt0_1): Reset current locale to "C" per POSIX.
869         * environ.cc (set_file_api_mode): Remove.
870         (codepage_init): Remove.
871         (parse_thing): Remove "codepage" setting.
872         (environ_init): Set locale according to environment settings, or
873         to current codepage, before converting environment to multibyte.
874         * fhandler.h (fhandler_console::write_replacement_char): Drop argument.
875         * fhandler_console.cc (dev_console::str_to_con): Call sys_cp_mbstowcs
876         rather than MultiByteToWideChar.
877         (fhandler_console::write_replacement_char): Always print a funny
878         half filled square if a character isn't in the current charset.
879         (fhandler_console::write_normal): Convert to using __mbtowc
880         rather than next_char.
881         * fork.cc (frok::child): Drop call to set_file_api_mode.
882         * globals.cc (enum codepage_type) Remove.
883         (current_codepage): Remove.
884         * miscfuncs.cc (cygwin_wcslwr): Unused, dangerous.  Remove.
885         (cygwin_wcsupr): Ditto.
886         (is_cp_multibyte): Remove.
887         (next_char): Remove.
888         * miscfuncs.h (is_cp_multibyte): Drop declaration.
889         (next_char): Ditto.
890         * strfuncs.cc (get_cp): Remove.
891         (__db_wctomb): New function to implement _wctomb_r functionality for
892         doublebyte charsets using WideCharToMultiByte.
893         (__sjis_wctomb): New function to replace unusable newlib function.
894         (__jis_wctomb): Ditto.
895         (__eucjp_wctomb): Ditto.
896         (__gbk_wctomb): New function.
897         (__kr_wctomb): Ditto.
898         (__big5_wctomb): Ditto.
899         (__db_mbtowc): New function to implement _mbtowc_r functionality for
900         doublebyte charsets using MultiByteToWideChar.
901         (__sjis_mbtowc): New function to replace unusable newlib function.
902         (__jis_mbtowc): Ditto.
903         (__eucjp_mbtowc): Ditto.
904         (__gbk_mbtowc): New function.
905         (__kr_mbtowc): New function
906         (__big5_mbtowc): New function
907         (__set_charset_from_codepage): New function.
908         (sys_wcstombs): Reimplement, basically using same wide char to multibyte
909         conversion as newlib's application level functions.  Plus extras.
910         Add lengthy comment to explain.  Change return type to size_t.
911         (sys_wcstombs_alloc): Just use sys_wcstombs.  Change return type to
912         size_t.
913         (sys_cp_mbstowcs): Replace sys_mbstowcs, take additional codepage
914         argument.  Explain why.  Change return type to size_t.
915         (sys_mbstowcs_alloc): Just use sys_mbstowcs.  Change return type to
916         size_t.
917         * wchar.h: Declare internal functions implemented in strfuncs.cc.
918         (wcscasecmp): Remove.
919         (wcsncasecmp): Remove.
920         (wcslwr): Remove.
921         (wcsupr): Remove.
922         * winsup.h (codepage_init): Remove declaration.
923         (get_cp): Ditto.
924         (sys_wcstombs): Align declaration to new implementation.
925         (sys_wcstombs_alloc): Ditto.
926         (sys_cp_mbstowcs): Add declaration.
927         (sys_mbstowcs): Define as inline function.
928         (sys_mbstowcs_alloc): Align declaration to new implementation.
929         (set_file_api_mode): Remove declaration.
930         * include/ctype.h (isblank): Redefine to use _B character class.
931         (toupper): Remove ASCII-only definition.
932         (tolower): Ditto.
933
934 2009-03-24  Corinna Vinschen  <corinna@vinschen.de>
935
936         * sec_auth.cc (str2buf2uni): Remove.
937         * security.h (str2buf2uni): Remove declaration.
938
939 2009-03-24  Yaakov Selkowitz  <yselkowitz@cygwin.com>
940
941         * include/mntent.h: Remove declarations of nonexistant addmntent
942         and hasmntopt.  Update and clarify the /etc/mtab comment.
943
944 2009-03-23  Corinna Vinschen  <corinna@vinschen.de>
945
946         * smallprint.cc (__small_vsprintf): Handle NULL PWCHAR and
947         PUNICODE_STRING arguments.
948         (__small_vswprintf): Ditto.
949
950 2009-03-23  Corinna Vinschen  <corinna@vinschen.de>
951
952         * include/asm/byteorder.h (__constant_ntohs): Remove declaration.
953         (__constant_ntohl): Ditto.
954
955 2009-03-23  Corinna Vinschen  <corinna@vinschen.de>
956
957         * cygwin.din: Export wordexp, wordfree.
958         * posix.sgml: Move them to SUSv4 list.
959         * include/cygwin/version.h: Bump API minor number.
960
961 2009-03-22  Yaakov Selkowitz  <yselkowitz@users.sourceforge.net>
962
963         * include/sys/un.h: #include <string.h> for strlen.
964
965 2009-03-19  Corinna Vinschen  <corinna@vinschen.de>
966
967         * dlfcn.cc (get_full_path_of_dll): Revert patch from 2008-07-16.
968
969 2009-03-19  Yaakov Selkowitz  <yselkowitz@users.sourceforge.net>
970
971         * cygwin.din: Export log2, log2f as functions.
972         * posix.sgml: Add them to SUSv4 list.
973         * include/cygwin/version.h: Bump API minor number.
974
975 2009-03-18  Corinna Vinschen  <corinna@vinschen.de>
976
977         * sec_auth.cc (lsaauth): Remove local definitions of struct
978         _TOKEN_LINKED_TOKEN and TokenLinkedToken in favor of definitions
979         from winnt.h.
980         (lsaprivkeyauth): As in lsaauth, fetch linked token if available and
981         return that in favor of default token.
982
983 2009-03-15  Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
984
985         * errno.cc (_sys_errlist): Add ESTRPIPE.
986
987 2009-03-15  Corinna Vinschen  <corinna@vinschen.de>
988
989         * cygwin.din: Export wcsdup.
990         * posix.sgml: Add wcsdup to SUSv4 list.
991         * include/cygwin/version.h: Bump API minor number.
992
993 2009-03-15  Corinna Vinschen  <corinna@vinschen.de>
994
995         * include/inttypes.h: Remove "l" size specifier from all 16 and 32 bit
996         definitions.
997
998 2009-03-14  Christopher Faylor  <me+cygwin@cgf.cx>
999
1000         * path.cc (warn_msdos): Don't warn about MS-DOS filenames encountered
1001         during initialization.
1002
1003 2009-03-14  Corinna Vinschen  <corinna@vinschen.de>
1004
1005         * gendef: Remove STABS directives.
1006
1007 2009-03-13  Corinna Vinschen  <corinna@vinschen.de>
1008
1009         * mktemp.cc: Remove STABS specific link-time warning.  Align copyright
1010         text to upstream.
1011
1012 2009-03-13  Corinna Vinschen  <corinna@vinschen.de>
1013
1014         * flock.cc: Fix lockf copyright to latest version.
1015
1016 2009-03-12  Corinna Vinschen  <corinna@vinschen.de>
1017
1018         * fhandler_disk_file.cc (path_conv::isgood_inode): Move to be defined
1019         earlier.
1020         (get_ino_by_handle): Take additional path_conv argument, accommodate
1021         throughout.  Only use FileId if isgood_inode check is true.
1022         (fhandler_base::open_fs): Simplify setting ino due to above change.
1023         (readdir_get_ino): Make sure to return always a non-zero inode number.
1024         (fhandler_disk_file::readdir): Always open file in dir with
1025         FILE_OPEN_REPARSE_POINT so as not to open wrong file.
1026         Drop call to isgood_inode here.
1027         * path.cc (symlink_info::check): Call fs.update in case we're fetching
1028         file information from call to NtQueryDirectoryFile.
1029
1030 2009-03-12  Corinna Vinschen  <corinna@vinschen.de>
1031
1032         * flock.cc (fhandler_disk_file::lock): Don't test file open mode in
1033         case of flock-type locks.  Explain why.
1034
1035 2009-03-12  Brian Ford <Brian.Ford@FlightSafety.com>
1036
1037         * gethostby_helper: Fix typos in DEBUGGING case.
1038
1039 2009-03-11  Corinna Vinschen  <corinna@vinschen.de>
1040
1041         * cygwin.din: Export wcscasecmp, wcsncasecmp.
1042         * posix.sgml: Move wcscasecmp, wcsncasecmp to SUSv4 list.
1043         * include/cygwin/version.h: Bump API minor number.
1044
1045 2009-03-11  Corinna Vinschen  <corinna@vinschen.de>
1046
1047         * cygwin.din: Export wscanf, fwscanf, swscanf, vwscanf, vfwscanf,
1048         vswscanf.
1049         * posix.sgml: Move fwscanf, swscanf, vwscanf, vfwscanf, vswscanf
1050         to SUSv4 list.
1051         * include/cygwin/version.h: Bump API minor number.
1052
1053 2009-03-09  Corinna Vinschen  <corinna@vinschen.de>
1054
1055         * fhandler.h (fhandler_socket::wait_for_events): Take additional
1056         parameter "dontwait".
1057         * fhandler_socket.cc (fhandler_socket::wait_for_events): Act as if the
1058         socket is non-blocking if dontwait is true.
1059         (fhandler_socket::recv_internal): Use incoming MSG_DONTWAIT flag to
1060         set the wait_for_events dontwait parameter.
1061         (fhandler_socket::send_internal): Ditto.  Optimize code slightly.
1062         * include/cygwin/socket.h (MSG_DONTWAIT): Define.
1063         * include/cygwin/version.h: Bump API minor number.
1064
1065 2009-03-09  Corinna Vinschen  <corinna@vinschen.de>
1066
1067         * cygwin.din: Export wcsftime.
1068         * posix.sgml: Move wcsftime to SUSv4 list.
1069         * include/cygwin/version.h: Bump API minor number.
1070
1071 2009-03-06  Pierre A. Humblet <pierre@phumblet.no-ip.org>
1072
1073         * cygwin.din: Export gethostbyname2.
1074         * net.cc: define _CYGWIN_IN_H and include resolv.h.
1075         (realloc_ent): New function.
1076         (dup_ent): Call realloc_ent.
1077         (memcpy4to6): New function.
1078         (dn_length1): New function.
1079         (gethostby_helper): New function.
1080         (gethostbyname2): New function.
1081         * posix.sgml: Add gethostbyname2.
1082         * include/cygwin/version.h: Bump API minor number.
1083         * libc/minires.c (get_options): Look for "inet6" and apply bounds
1084         to "retry" and "retrans".
1085         (res_ninit): Set the default options at the beginning.
1086         (dn_expand): Fix "off by one".
1087
1088 2009-03-06  Corinna Vinschen  <corinna@vinschen.de>
1089
1090         * cygwin.din: Export wprintf, fwprintf, swprintf, vwprintf, vfwprintf,
1091         vswprintf.  Sort.
1092         * posix.sgml: Move fwprintf, swprintf, vwprintf, vfwprintf, vswprintf
1093         to SUSv4 list.  Sort SUSv4 list.
1094         * include/cygwin/version.h: Bump API minor number.
1095
1096 2009-03-04  Corinna Vinschen  <corinna@vinschen.de>
1097
1098         * dcrt0.cc (disable_dep): Disable.  Explain why.
1099         (dll_crt0_0): Disable calling disable_dep.  Explain why.
1100
1101 2009-03-03  Corinna Vinschen  <corinna@vinschen.de>
1102
1103         * net.cc: Include asm/byteorder.h.
1104         (htonl): Move to end of file.  Add comment to explain why.  Align
1105         definition to POSIX.  Use related macro from asm/byteorder.h.
1106         (ntohl): Ditto.
1107         (htons): Ditto.
1108         (ntohs): Ditto.
1109         * include/asm/byteorder.h: Revert previous patch.
1110
1111 2009-03-03  Corinna Vinschen  <corinna@vinschen.de>
1112
1113         * include/asm/byteorder.h: Disable optimization when building
1114         Cygwin network code.
1115
1116 2009-02-26  Christopher Faylor  <me+cygwin@cgf.cx>
1117
1118         * dtable.cc (dtable::select_read): Add ability to override fh.
1119         * fhandler.h (fhandler_fifo::select_read): Declare new function.
1120         (fhandler_fifo::select_write): Ditto.
1121         (fhandler_fifo::select_except): Ditto.
1122         * select.cc (peek_pipe): Treat certain classes of pipe errors as "no
1123         data".
1124         (fhandler_fifo::select_read): Define new function.
1125         (fhandler_fifo::select_write): Ditto.
1126         (fhandler_fifo::select_except): Ditto.
1127
1128         * shared_info.h (CURR_SHARED_MAGIC): Update.
1129
1130 2009-02-23  Sjors Gielen <mailinglist@dazjorz.com>
1131
1132         * Makefile.in: Add DESTDIR functionality.
1133
1134 2009-02-23  Corinna Vinschen  <corinna@vinschen.de>
1135
1136         * sec_auth.cc (get_user_local_groups): Simplify LookupAccountName code.
1137
1138 2009-02-20  Corinna Vinschen  <corinna@vinschen.de>
1139
1140         * autoload.cc (NetLocalGroupEnum): Remove.
1141         (NetLocalGroupGetMembers): Remove.
1142         (NetUserGetLocalGroups): Add.
1143         * sec_auth.cc (is_group_member): Remove function.
1144         (get_user_local_groups): Get user as string instead of as SID.
1145         Call NetUserGetLocalGroups instead of NetLocalGroupEnum.  Drop call
1146         to is_group_member.
1147         (get_server_groups): Call get_user_local_groups with user name instead
1148         of user SID.
1149
1150 2009-02-19  Corinna Vinschen  <corinna@vinschen.de>
1151
1152         * winver.rc: Fix Copyright date.
1153
1154 2009-02-19  Corinna Vinschen  <corinna@vinschen.de>
1155
1156         * cygwin.din: Export mbsnrtowcs and wcsnrtombs.
1157         * posix.sgml: Move mbsnrtowcs and wcsnrtombs to SUSv4 section.
1158         * include/cygwin/version.h: Bump API minor number.
1159
1160 2009-02-18  Corinna Vinschen  <corinna@vinschen.de>
1161
1162         * cygwin.din: Export open_wmemstream.
1163         * posix.sgml: Move open_wmemstream to SUSv4 section.
1164         * include/cygwin/version.h: Bump API minor number.
1165
1166 2009-02-16  Corinna Vinschen  <corinna@vinschen.de>
1167
1168         * cygwin.din: Export reallocf.
1169         * malloc_wrapper.cc( reallocf): New function.
1170         * posix.sgml: Add reallocf to BSD section.
1171         * include/cygwin/version.h: Bump API minor number.
1172         * libc/fts.c: Remove erroneous reallocf definition.
1173
1174 2009-02-16  Corinna Vinschen  <corinna@vinschen.de>
1175
1176         * cygwin.din: Export wcstoimax, wcstoumax.
1177         * posix.sgml: Move wcstoimax and wcstoumax to SUSv4 section.
1178         * include/inttypes.h: Declare wcstoimax and wcstoumax.
1179         * include/cygwin/version.h: Bump API minor number.
1180
1181 2009-02-13  Corinna Vinschen  <corinna@vinschen.de>
1182
1183         * cygwin.din: Export wcsnlen.
1184         * posix.sgml: Move wcsnlen to SUSv4 section.
1185         * include/cygwin/version.h: Bump API minor number.
1186
1187 2009-02-13  Corinna Vinschen  <corinna@vinschen.de>
1188
1189         * environ.cc (_getenv_r): New function.
1190
1191 2009-02-13  Corinna Vinschen  <corinna@vinschen.de>
1192
1193         * posix.sgml: Move dirfd to SUSv4 section.
1194
1195 2009-02-13  Corinna Vinschen  <corinna@vinschen.de>
1196
1197         * posix.sgml: Move interfaces deprecated in SUSv4 to deprecated
1198         interfaces section.  Move interfaces added in SUSv4 to SUSv4
1199         section or, if unimplemented, add them to the unimplemented interfaces
1200         section.
1201
1202 2009-02-13  Corinna Vinschen  <corinna@vinschen.de>
1203
1204         * posix.sgml: Merge SUSv3 and SUSv4 section into a single SUSv4 section.
1205         Move Solaris calls now in SUSv4 to SUSv4 section.  Rename unimplemented
1206         section to refer to SUSv4.  Add note about missing interfaces.
1207         Move wcstod and wcstof from unimplemented to SUSv4 section.
1208
1209 2009-02-13  Corinna Vinschen  <corinna@vinschen.de>
1210
1211         * mount.cc (mount_info::from_fstab_line): Make cygdrive posix=0 by
1212         default as documented.
1213
1214 2009-02-13  Corinna Vinschen  <corinna@vinschen.de>
1215
1216         * cygwin.din: Export wcstod and wcstof.
1217         * include/cygwin/version.h: Bump API minor number.
1218
1219 2009-02-11  Corinna Vinschen  <corinna@vinschen.de>
1220
1221         * syscalls.cc (open): Handle O_DIRECTORY flag.
1222         * include/fcntl.h: Add SUSv4 flags O_DIRECTORY, O_EXEC and O_SEARCH.
1223         * include/cygwin/version.h: Bump API minor number.
1224
1225 2009-02-09  Corinna Vinschen  <corinna@vinschen.de>
1226
1227         * fhandler_floppy.cc (fhandler_dev_floppy::open): Fix format.  Add
1228         code to allow to read disk and CD/DVD devices in full length.  Explain
1229         why.
1230         (fhandler_dev_floppy::raw_read): Add current position to debug output.
1231
1232         * include/sys/sched.h: New stub file to override newlib file with
1233         clashing definitions.
1234
1235 2009-02-05  Corinna Vinschen  <corinna@vinschen.de>
1236
1237         * cygwin.din: Export wcstok.
1238         * posix.sgml: Move wcstok from unimplemented to susv3.
1239         * include/cygwin/version.h: Bump API minor number.
1240
1241 2009-02-04  Corinna Vinschen  <corinna@vinschen.de>
1242
1243         * fhandler_proc.cc (proc_tab): Add entry for mounts symlink.
1244         (format_proc_mounts): New function to implement mounts symlink.
1245         * fhandler_process.cc (process_tab): Add entry for mounts file.
1246         (format_process_mounts): New function to implement mounts file.
1247
1248 2009-02-04  Corinna Vinschen  <corinna@vinschen.de>
1249
1250         * security.cc (alloc_sd): Disable generating default permission entries
1251         for directories.
1252
1253 2009-01-29  Corinna Vinschen  <corinna@vinschen.de>
1254
1255         * fhandler_disk_file.cc (fhandler_disk_file::readdir): Fix inode number
1256         evaluation for faked "." entry.
1257
1258         * mount.cc (fs_info::update): Move setting of is_cdrom after checking
1259         for caseinsensitivity.  Recognize UDF in is_cdrom case and set
1260         caseinsensitive flag according to UDF brokenness determined by OS.
1261         Add comment to explain why.
1262         * mount.h (class fs_info): Add is_udf status flag.
1263         * path.cc (symlink_info::check): Add workaround for UDF bug in
1264         terms of casesensitivity on certain OSes.
1265         * wincap.h (wincaps::has_broken_udf): New element.
1266         * wincap.cc: Implement above element throughout.
1267
1268 2009-01-27  Christopher Faylor  <me+cygwin@cgf.cx>
1269
1270         * fhandler.cc (fhandler_base::wait_overlapped): Set bytes to -1 on
1271         EINTR or real error.
1272         (fhandler_base::write_overlapped): Assume that bytes_written will
1273         contain proper error value.
1274         * pipe.cc (fhandler_pipe::fhandler_pipe): Set uninterruptible_io since
1275         signals are handled by pipe functions now.
1276
1277 2009-01-26  Corinna Vinschen  <corinna@vinschen.de>
1278
1279         * shared.cc (shared_name): New function for WCHAR names.
1280         (open_shared): Take name parameter as WCHAR.  Accommodate throughout.
1281         * shared_info.h ((CURR_SHARED_MAGIC): Redefine.
1282         (shared_name): Add declaration for function taking a WCHAR name.
1283         (open_shared): Change declaration according to above change.
1284         * pinfo.cc (pinfo::init) : Accommodate above change.
1285
1286 2009-01-26  Corinna Vinschen  <corinna@vinschen.de>
1287
1288         * grp.cc (getgrgid_r): Simplify code by using stpcpy.
1289         (getgrnam_r): Ditto.
1290         * passwd.cc (getpwuid_r32): Simplify code by using stpcpy.
1291         (getpwnam_r): Ditto.
1292
1293 2009-01-26  Corinna Vinschen  <corinna@vinschen.de>
1294
1295         * uinfo.cc (pwdgrp::load): Open file with FILE_OPEN_FOR_BACKUP_INTENT
1296         flag.
1297
1298 2009-01-24  Corinna Vinschen  <corinna@vinschen.de>
1299
1300         * mount.cc (mount_info::from_fstab): Open fstab file with
1301         FILE_OPEN_FOR_BACKUP_INTENT flag.
1302
1303 2009-01-23  Corinna Vinschen  <corinna@vinschen.de>
1304
1305         * smallprint.cc (__small_vsprintf): Use already available buffer tmp
1306         in wfillin case.
1307
1308 2009-01-22  Christopher Faylor  <me+cygwin@cgf.cx>
1309
1310         * select.cc (peek_serial): Add hack to allow proper operation with
1311         com0com driver.
1312
1313 2009-01-21  Corinna Vinschen  <corinna@vinschen.de>
1314
1315         Remove USE_SERVER define.  Accommodate throughout.
1316         * configure.in: Remove --enable-server option.
1317         * configure: Regenerate.
1318         * environ.cc: Remove CYGWIN=server setting.
1319
1320 2009-01-20  Corinna Vinschen  <corinna@vinschen.de>
1321
1322         * fhandler_procnet.cc: Reorganize global procnet content data into a
1323         new struct virt_tab_t.  Accommodate throughout.
1324
1325         * fhandler.h: Fix copyright dates.
1326         * fhandler_process.cc: Ditto.
1327         * fhandler_registry.cc: Ditto.
1328
1329 2009-01-20  Corinna Vinschen  <corinna@vinschen.de>
1330
1331         * devices.h (FH_PROCESSFD): New device type.
1332         * dtable.cc (build_fh_pc): Add case for FH_PROCESSFD.
1333         * fhandler.h (class fhandler_virtual): Drop bufalloc member.
1334         * fhandler_virtual.h: New header.
1335         * fhandler_proc.cc: Remove types proc_type_t and proc_tab_t in favor
1336         of types virt_type_t and virt_tab_t from fhandler_virtual.h.
1337         Change prototypes of format_XXX functions accordingly.
1338         (proc_tab): Drop size member info.
1339         (fhandler_proc::fill_filebuf): Don't allocate filebuf here.  Allocate
1340         it in the format_XXX functions.
1341         * fhandler_process.cc: Reorganize global process content data into a
1342         new struct virt_tab_t.  Accommodate throughout.
1343         (format_process_winexename): New function.
1344         (format_process_winpid): New function.
1345         (format_process_exename): New function.
1346         (format_process_root): New function.
1347         (format_process_cwd): New function.
1348         (format_process_cmdline): New function.
1349         (format_process_ppid): New function.
1350         (format_process_uid): New function.
1351         (format_process_pgid): New function.
1352         (format_process_sid): New function.
1353         (format_process_gid): New function.
1354         (format_process_ctty): New function.
1355         (format_process_fd): New function.
1356         * fhandler_procnet.cc (fhandler_procnet::fill_filebuf): Don't use
1357         bufalloc.
1358         * fhandler_registry.cc (fhandler_registry::fill_filebuf): Define
1359         bufalloc locally.
1360         * fhandler_virtual.cc (fhandler_virtual::fhandler_virtual): Drop
1361         initialization of bufalloc.
1362         (fhandler_virtual::dup): Drop copying bufalloc.
1363
1364 2009-01-20  Corinna Vinschen  <corinna@vinschen.de>
1365
1366         * thread.h (struct pthread_rwlock::RWLOCK_READER): Add counter n.
1367         * thread.cc (pthread_rwlock::rdlock): If a thread already owns a
1368         read lock, just count the number of locks for it, per SUSv4.
1369         (pthread_rwlock::tryrdlock): Ditto.
1370         (pthread_rwlock::unlock): If a thread has more than one concurrent
1371         read locks, just count down.
1372
1373 2009-01-20  Corinna Vinschen  <corinna@vinschen.de>
1374
1375         * autoload.cc (WSAIoctl): Reintroduce.
1376         (WSASendMsg): Define.
1377         * fhandler.h (class fhandler_socket): Change definition of recv_internal
1378         and send_internal to take WSAMSG pointer as parameter.
1379         * fhandler_socket.cc (WSAID_WSARECVMSG): Define.
1380         (LPFN_WSARECVMSG): Define.
1381         (WSASendMsg): Declare.
1382         (get_ext_funcptr): New function to fetch address of WSARecvMsg.
1383         (fhandler_socket::recv_internal): Take just a LPWSAMSG parameter.
1384         Change code accordingly.  If control information is requested,
1385         fetch address of WSARecvMsg and use that instead of WSARecvFrom.
1386         (fhandler_socket::recvfrom): Change return type to ssize_t as
1387         declared in fhandler.h.  Accommodate changes to recv_internal.
1388         (fhandler_socket::recvmsg): Ditto.  Make sure that control information
1389         is only requested if system, address family, and socket type support it.
1390         (fhandler_socket::send_internal): Take just a LPWSAMSG parameter
1391         and the flags.  Change code accordingly.  If control information is
1392         provided, use WSASendMsg instead of WSASendTo.
1393         (fhandler_socket::sendto): Drop useless comment.  Accommodate changes
1394         to send_internal.
1395         (fhandler_socket::sendmsg): Ditto.  Make sure that control information
1396         is only provided if system, address family, and socket type support it.
1397         * wincap.h (wincaps::has_recvmsg): New element.
1398         (wincaps::has_sendmsg): New element
1399         * wincap.cc: Implement above elements throughout.
1400         * include/cygwin/socket.h (CMSG_ALIGN): Phrase in terms of alignment
1401         of type struct cmsghdr.
1402
1403 2009-01-17  Corinna Vinschen  <corinna@vinschen.de>
1404
1405         * mmap.cc (mmap64): Fix condition checking if anonymous mapping beyond
1406         EOF is required.
1407
1408 2009-01-17  Corinna Vinschen  <corinna@vinschen.de>
1409
1410         * fhandler_proc.cc: Reorganize global proc content data into a new
1411         struct proc_tab_t.  Accommodate throughout.
1412         (format_proc_version): New function.
1413         (format_proc_loadavg): New function.
1414         (format_proc_self): New function.
1415
1416         * resource.cc (getrlimit): Return correct rlim_max value for
1417         RLIMIT_NOFILE.
1418
1419 2009-01-16  Corinna Vinschen  <corinna@vinschen.de>
1420
1421         * Fix copyright dates.
1422
1423 2009-01-13  Corinna Vinschen  <corinna@vinschen.de>
1424
1425         * libc/getopt.c (parse_long_options): Use fix from NetBSD's getopt
1426         to avoid false ambiguities.
1427
1428 2009-01-12  Corinna Vinschen  <corinna@vinschen.de>
1429
1430         * syscalls.cc (enum bin_status): New type.
1431         (try_to_bin): Return bin_status.  Rename win32_path to pc.  Rename h
1432         to fh.  Rename fh to tmp_fh.  Add code to set delete dispostion and
1433         more code to replace file moved to bin by another, temporary file.
1434         Add comments to explain why.
1435         (unlink_nt): Replace move_to_bin with bin_stat.  Only set bin_stat
1436         to move_to_bin for non-remote files.  As a last resort, call try_to_bin
1437         if setting delete-on-close failed.  Only re-set R/O DOS attribute
1438         and only close handle if it's still valid.
1439
1440 2009-01-11  Corinna Vinschen  <corinna@vinschen.de>
1441
1442         * errno.cc (errmap): Set errno to ENOENT instead of ENOSHARE throughout.
1443         * path.cc (path_conv::check): Set to and check for ENOENT instead of
1444         ENOSHARE.
1445
1446         * path.cc (symlink_info::check): Fix Samba 3.2.x comment.
1447
1448 2009-01-09  Corinna Vinschen  <corinna@vinschen.de>
1449
1450         * mount.cc (mount_info::from_fstab_line): Always convert drive
1451         letter in native path to uppercase.
1452         * path.cc (normalize_win32_path): Ditto.
1453         (path_prefix_p): Revert previous patch.
1454
1455         * path.cc (symlink_info::check): Check for STATUS_INVALID_PARAMETER
1456         return code to circumvent weird behaviour of Samba 3.2.x shares.
1457
1458 2009-01-09  Christopher Faylor  <me+cygwin@cgf.cx>
1459
1460         * include/sys/cygwin.h (CW_SETERRNO): Define.
1461         * external.cc (CW_SETERRNO): Implement.
1462         * include/cygwin/version.h: Bump CYGWIN_VERSION_API_MINOR to 192 to
1463         reflect the above change.
1464
1465         * path.cc (path_prefix_p): Treat X: as equivalent to x:.
1466
1467         * mkglobals_h: Remove unneeded #define.
1468
1469         * spawn.cc (spawn_guts): Avoid overly wordy initialization to zero.
1470
1471 2009-01-08  Corinna Vinschen  <corinna@vinschen.de>
1472
1473         * libc/fts.c (fts_build): Use DT_DIR case on Cygwin.
1474         (fts_ufslinks): Fix using wrong structure member in Cygwin-specific
1475         code.
1476
1477 2009-01-07  Corinna Vinschen  <corinna@vinschen.de>
1478
1479         * ntdll.h: Reorder NT status flags.  Fix a case difference. Add
1480         STATUS_CANNOT_DELETE flag.
1481         * syscalls.cc (unlink_nt): Change initial NtOpenFile to request
1482         FILE_SHARE_DELETE sharing mode.  Change comment accordingly.
1483         If setting delete disposition failed with STATUS_CANNOT_DELETE, try
1484         to delete using delete-on-close.  Explain why.
1485         Rearrange setting R/O DOS attribute after trying to delete.  Simplify
1486         comment.
1487
1488 2009-01-07  Corinna Vinschen  <corinna@vinschen.de>
1489
1490         * fhandler_disk_file.cc (fhandler_disk_file::link): Only add .exe if
1491         original file has .exe as well.
1492         * path.cc (path_conv::is_binary): Only recognize Windows 32 and 64 bit
1493         apps as binaries.
1494
1495 2009-01-02  Christopher Faylor  <me+cygwin@cgf.cx>
1496
1497         Remove unneeded header files from source files throughout.
1498         Update copyrights where appropriate.
1499
1500         * globals.cc: New file for generic global variables.
1501         * mkglobals_h: New script to generate globals.h.
1502         * mkstatic: New script used to build a (currently non-working) static
1503         libcygwin_s.a.
1504         * Makefile.in: Add unused rule to build a non-working libcygwin_s.a.
1505         (DLL_OFILES): Add globals.o.  Make all objects rely on globals.h.
1506         (globals.h): New target.  Generate globals.h.
1507         * cygtls.h: Honor new CYGTLS_HANDLE define to control when the HANDLE
1508         operator is allowed in _cygtls.
1509         * dcrt0.cc: Move most globals to globals.cc.
1510         * init.cc: Ditto.
1511         * environ.cc (strip_title_path): Remove now-unneeded extern.
1512         * fhandler_serial.cc (fhandler_serial::open): Ditto.
1513         * pinfo.cc: Ditto.
1514         (commune_process): Ditto.
1515         * shared.cc: Ditto.
1516         * glob.cc: Ditto.
1517         * strace.cc: Ditto.
1518         * exceptions.cc: Define CYGTLS_HANDLE before including winsup.h.
1519         * path.cc (stat_suffixes): Move here.
1520         * security.h: Add forward class path_conv declaration.
1521         * smallprint.cc (__small_vsprintf): Make a true c++ function.
1522         (__small_sprintf): Ditto.
1523         (small_printf): Ditto.
1524         (console_printf): Ditto.
1525         (__small_vswprintf): Ditto.
1526         (__small_swprintf): Ditto.
1527         * spawn.cc (spawn_guts): Remove _stdcall decoration in favor of
1528         regparm.
1529         (hExeced): Move to globals.cc
1530         * strfuncs.cc (current_codepage): Ditto.
1531         (active_codepage): Ditto.
1532         * sync.cc (lock_process::locker): Move here from dcrt0.cc.
1533         * syscalls.cc (stat_suffixes): Move to path.cc.
1534         * tty.cc (tty::create_master): Uncapitalize fatal warning for
1535         consistency.
1536         * winsup.h: Include globals.h to declare most of the grab bag list of
1537         globals which were previously defined here.
1538
1539         * mount.h: Move USER_* defines back to shared_info.h.
1540
1541         * speclib: Force temporary directory cleanup.
1542
1543 2009-01-02  Christopher Faylor  <me+cygwin@cgf.cx>
1544
1545         * speclib: Rewrite completely in perl.  Avoid multiple nm calls.