OSDN Git Service

* gas/mri/mri.exp: Fix test of m6811/m6812 targets.
[pf3gnuchains/pf3gnuchains4x.git] / winsup / cygwin / ChangeLog
1 Sat Mar 17 21:48:03 2001  Christopher Faylor <cgf@cygnus.com>
2
3         * external.cc (fillout_pinfo): Match windows pid, as well as cygwin pid
4         when passed in pid.  Don't prematurely break when searching for a pid.
5
6         * thread.h (_winsup_t): Eliminate unneeded field.
7
8 Sat Mar 17 20:46:00 2001  Corinna Vinschen <corinna@vinschen.de>
9
10         * net.cc (get_95_ifconf): Use strcasematch instead of strcasecmp.
11         * syscalls.cc (_unlink): Ditto.
12         (_rename): Ditto.
13
14 Sat Mar 17 12:43:15 2001  Christopher Faylor <cgf@cygnus.com>
15
16         * path.cc (suffix_scan::next): Avoid searching for foo.lnk twice when
17         input is "foo".
18
19 Sat Mar 17 18:10:00 2001  Corinna Vinschen <corinna@vinschen.de>
20
21         * net.cc (cygwin_socket): Set protocol to 0 when address family is
22         AF_UNIX to avoid WSAEPROTONOSUPPORT error.
23
24 Sat Mar 17 09:51:32 2001  Mathew Brozowski <brozow@tavve.com>
25
26         * net.cc (cygwin_socket): Pass protocol parameter to socket call.
27
28 Sat Mar 17 02:05:38 2001  Christopher Faylor <cgf@cygnus.com>
29
30         * dir.cc (readdir): Use strcasematch for consistency.
31         * path.cc (symlink_info): Eliminate known_suffix.
32         (path_conv::check): Always copy ext_here to end of buffer, if found.
33         (suffix_scan): Eliminate ext_here, add suffixes_start.
34         (suffix_scan::has): Eliminate an argument.  Reorganize.  Always return
35         pointer to end of input path.
36         (suffix_scan::next): Take a second pass through the suffix list looking
37         for .lnk.
38         (symlink_info::check): Eliminate known_suffix usage.
39
40 Sat Mar 17 00:10:52 2001  Christopher Faylor <cgf@cygnus.com>
41
42         * syscalls.cc (stat_dev): Give devices full read/write by default.
43
44 Saturday Mar 17 3:45 2001 Robert Collins <rbtcollins@hotmail.com>
45
46         * thread.cc (MTinterface::CreateCond): Check for null attr pointer.
47
48 Fri Mar 16 21:13:23 2001  Christopher Faylor <cgf@cygnus.com>
49
50         * fhandler_termios.cc (fhandler_termios::line_edit): Don't accept input
51         when a signal is sent or we'll end up in an EOF/signal race.
52
53 Fri Mar 16 20:25:40 2001  Christopher Faylor <cgf@cygnus.com>
54
55         * path.cc: Translate scan states from defines to enums.
56         (suffix_scan): Rename state to nextstate for clarity.
57         (lnk_match): Change to allow multiple states to indicate that a .lnk
58         has been matched.
59         (suffix_scan::has): Eliminate a goto.  Handle .lnk as a special case,
60         since a .lnk may also need to be tacked on the end of a .lnk.
61         (suffix_scan::next): Don't increment next state.  Set it specifically.
62         Recognize new .lnk states.
63
64 Saturday Mar 17 01:19 2001 Robert Collins rbtcollins@hotmail.com
65    
66         * cygwin.din: Export the new functions.
67         * pthread.cc (pthread_cond_*): Add wrapper functions that call
68         __pthread_cond* functions.
69         * thread.cc (__pthread_cond_*): Implement the pthread_cond* functions.
70         * thread.h: Add new class entries and prototypes for __pthread_cond*
71         functions.
72         * include/pthread.h: user land header prototypes for pthread_cond*
73         functions and related defines.
74
75 Wed Mar 14 16:30:00 2001  Corinna Vinschen <corinna@vinschen.de>
76
77         * environ.cc (parse_options): Use strtok_r instead of strtok.
78         * security.cc (convert_string_sid_to_sid): Ditto.
79         (aclfromtext): Ditto. Fix buffer usage.
80
81 Wed Mar 14 10:11:00 2001  Corinna Vinschen <corinna@vinschen.de>
82
83         * path.cc (lnk_suffixes): Remove.
84         (class suffix_scan): Add `lnk_state' flag.
85         (suffix_scan::lnk_match): Return state of `lnk_state' now.
86         (suffix_scan::has): Changed behaviour if file has `.lnk' suffix.
87         (suffix_scan::next): Set `lnk_state' where appropriate.
88         (symlink_info::check): Fix a wrong `break'.
89         * syscalls.cc (chown_worker): Change debug statement to reflect
90         lchown fix.
91         (lchown): Call chown_worker with `PC_SYM_NOFOLLOW' instead of
92         `PC_SYM_IGNORE'.
93
94 Tue Mar 13 13:52:00 2001  Corinna Vinschen <corinna@vinschen.de>
95
96         * fhandler.cc (fhandler_disk_file::fstat): Add correct modes to
97         symlinks when stat'ing on FAT or FAT32 file systems.
98
99 2001-03-12  Egor Duda  <deo@logos-m.ru>
100
101         * fhandler.h (fhandler_termios::fixup_after_exec): New function.
102         * fhandler_termios.cc (fhandler_termios::fixup_after_fork): New
103         function. Fixup output handle.
104         * fhandler_tty.cc (fhandler_tty_common::fixup_after_fork): Output
105         handle is now fixed up in fhandler_termios::fixup_after_fork().
106
107 2001-03-12  Egor Duda  <deo@logos-m.ru>
108
109         * fhandler.h (fhandler_termios::fhandler_termios): Enable fixup
110         after fork.
111         * fhandler_console.cc (fhandler_console::fhandler_console): Fixup
112         after fork is now enabled in the base class constructor.
113
114 Mon Mar 12 11:19:41 2001  Christopher Faylor <cgf@cygnus.com>
115
116         * mkvers.sh: Include config.h so that DEBUGGING is correctly defined.
117
118 Mon Mar 12 09:47:55 2001  Christopher Faylor <cgf@cygnus.com>
119
120         * spawn.cc (spawn_guts): Don't set EXIT_REPARENTING if parent process
121         is not a cygwin process (suggested by Jason Gouger
122         <cygwin@jason-gouger.com>).
123
124 Sun Mar 11 16:00:58 2001  Christopher Faylor <cgf@cygnus.com>
125
126         * child_info.h: Bump magic number for fork/exec/spawn.
127
128 Sat Mar 10 20:54:47 2001  Christopher Faylor <cgf@cygnus.com>
129
130         * autoload.cc (noload): Use proper method for multiline strings or
131         newer gcc's complain.
132         * exceptions.cc (unused_sig_wrapper): Ditto.
133         * fhandler.h (fhandler_base): Make get_io_handle and friends return
134         self.
135         * fhandler_tty.cc (fhandler_pty_common::close_on_exec): Accomodate
136         DEBUGGING flag to avoid spurious warnings when inheritance is set.
137
138 Sat Mar 10 16:52:12 2001  Christopher Faylor <cgf@cygnus.com>
139
140         * shortcut.c (PATH_ALL_EXEC): Add parentheses to avoid a compiler
141         warning.
142
143         * exceptions.cc (setup_handler): Clarify debugging message.
144         * sigproc.cc (proc_subproc): Remove PROC_CHILDSTOPPED test.  It is
145         handled by normal PROC_CLEARWAIT case.
146         (wait_sig): Eliminate "dispatched" tracking.  Remove __SIGCHILDSTOPPED
147         test.  Decrement counter again before jumping out of
148         InterlockedDecrement loop so that subsequent InterlockedIncrement will
149         keep the counter at the correctly decremented value and also detect
150         when there are pending signals.
151         * sigproc.h: Remove __SIGCHILDSTOPPED element.
152         (procstuff): Remove PROC_CHILDSTOPPED element.
153
154 Sat Mar 10 15:22:44 2001  Christopher Faylor <cgf@cygnus.com>
155
156         * syscalls.cc (_rename): Set errno to ENOENT when an old path doesn't
157         exist (from Kazuhiro Fujieda <fujieda@jaist.ac.jp>).  Also set EACCES
158         when directory is not writable.
159
160 Wed Mar  7 15:49:47 2001  Christopher Faylor <cgf@cygnus.com>
161
162         * syscalls.cc (_read): Change definition to return ssize_t to be
163         consistent with read.
164         (_write): Change definition to return ssize_t to be consistent with
165         write.
166
167 Wed Mar  7 01:08:21 2001  Christopher Faylor <cgf@cygnus.com>
168
169         * sigproc.h (sigthread): Declare new methods.  Create new winapi_lock
170         field.
171         (sigframe:;set): Call get_winapi_lock after frame is set so that signal
172         handler thread knows not to call SuspendThread.
173         (sigframe::~sigframe): Release winapi_lock.
174         * exceptions.cc (sigthread::get_winapi_lock): New method.
175         (sigthread::release_winapi_lock): New method.
176         (setup_handler): Use get_winapi_lock to ensure that signalled thread is
177         not blocked in a Windows API.
178
179         * path.h (path_types): Avoid broken GCC warning.
180
181 Tue Mar  6 14:02:00 2001  Corinna Vinschen <corinna@vinschen.de>
182
183         * path.cc (suffix_scan::has): Change order of conditionals
184         to allow checking for .lnk suffixes even if in_suffixes is empty.
185
186 Tue Mar  6 13:02:00 2001  Corinna Vinschen <corinna@vinschen.de>
187
188         * autoload.c (cygwin_premain0): Add missing parameter.
189         * binmode.c (cygwin_premain0): Ditto.
190         * textmode.c (cygwin_premain0): Ditto.
191
192 Tue Mar  6 12:04:00 2001  Jason Tiller <jtiller@sjm.com>
193
194         * auto_load.cc: Add "GetKeyboardLayout" entry in the list of
195         Win32 User32.DLL exports to provide.
196         * fhandler.h (class fhandler_console): Add meta_mask private
197         member to remember which keystroke modifiers should generate
198         META.
199         * fhandler_console.cc (fhandler_console::read): Modify code that
200         tests a keystroke for a META-escaped key to use the 'meta_mask'
201         variable.
202         (fhandler_console::fhandler_console): Add definition for
203         variable "meta_mask" used to determine if a keystroke should be
204         preceded by META in the client console stream.  Set meta_mask
205         based on whether or not user's keyboard language is English -
206         non-English keyboards pass AltGr (right <ALT>) unmolested,
207         whereas English keyboards now interpret left- and right-<ALT>
208         as META.
209
210 Mon Mar  5 20:15:00 2001  Corinna Vinschen <corinna@vinschen.de>
211
212         * include/a.out.h: Add copyright hint.
213         * include/fcntl.h: Ditto.
214         * include/lastlog.h: Ditto.
215         * include/memory.h: Ditto.
216         * include/mntent.h: Ditto.
217         * include/paths.h: Ditto.
218         * include/poll.h: Ditto.
219         * include/syslog.h: Ditto.
220         * include/termio.h: Ditto.
221         * include/tzfile.h: Ditto.
222         * include/arpa/inet.h: Ditto.
223         * include/asm/byteorder.h: Ditto.
224         * include/asm/socket.h: Ditto.
225         * include/asm/types.h: Ditto.
226         * include/cygwin/if.h: Ditto.
227         * include/cygwin/mtio.h: Ditto.
228         * include/cygwin/rdevio.h: Ditto.
229         * include/cygwin/socket.h: Ditto.
230         * include/net/if.h: Ditto.
231         * include/netinet/in.h: Ditto.
232         * include/netinet/in_systm.h: Ditto.
233         * include/netinet/ip.h: Ditto.
234         * include/netinet/ip_icmp.h: Ditto.
235         * include/netinet/tcp.h: Ditto.
236         * include/sys/cdefs.h: Ditto.
237         * include/sys/cygwin.h: Ditto.
238         * include/sys/ioctl.h: Ditto.
239         * include/sys/mman.h: Ditto.
240         * include/sys/mount.h: Ditto.
241         * include/sys/mtio.h: Ditto.
242         * include/sys/procfs.h: Ditto.
243         * include/sys/resource.h: Ditto.
244         * include/sys/smallprint.h: Ditto.
245         * include/sys/socket.h: Ditto.
246         * include/sys/strace.h: Ditto.
247         * include/sys/syslog.h: Ditto.
248         * include/sys/sysmacros.h: Ditto.
249         * include/sys/termio.h: Ditto.
250         * include/sys/termios.h: Ditto.
251         * include/sys/uio.h: Ditto.
252         * include/sys/un.h: Ditto.
253         * include/sys/utsname.h: Ditto.
254         * include/sys/vfs.h: Ditto.
255         * include/sys/wait.h: Ditto.
256         * regexp/regerror.c: Ditto.
257         * regexp/regexp.h: Ditto.
258         * regexp/regmagic.h: Ditto.
259
260 Mon Mar  5 01:25:03 2001  Christopher Faylor <cgf@cygnus.com>
261
262         * dlopen.c (dlopen): Return NULL when name is NULL (suggested by
263         chrisiasci@aol.com).
264
265         * cygwin.din: Add a new, internally used export -
266         _check_for_executable.
267         * dcrt0.cc (dll_crt0_1): Set _check_for_executable for older binaries.
268         Pass user_data to premain functions.
269         * fhandler.cc (fhandler_disk_file::open): Only check for executable if
270         the linked program is intereested in the executable bit.
271         (fhandler_disk_file::check_execable_p): Delete.
272         * fhandler.h (executable_states): New enumeration of various states of
273         executable bit caring.
274         (fhandler_base::set_execable_p): New method.
275
276         * fhandler_termios.cc (fhandler_termios::line_edit): Flag when a signal
277         has been sent to the tty.  Return -1 when this is so.
278         * fhandler_console.cc (fhandler_console::read): Return -1 when signal
279         sending character encountered.
280
281         * path.cc (path_conv::check): Record when path refers to a disk device.
282         Move executable extension check here.
283         (check_sysfile): Accomodate new EXEC path states.
284         (has_suffix): Remove.
285         (next_suffix): Remove.
286         (class suffix_scan): New clas.
287         (suffix_scan::has): New method.
288         (suffix_scan:next): New method.
289         (symlink_info::check): Use suffix_scan method to control for scanning
290         for suffixes.
291         * path.h (path_conv::exec_state): New method.
292         * perprocess.h: Make "C" friendly.
293         * include/cygwin/version.h: Define CYGWIN_VERSION_CHECK_FOR_S_IEXEC.
294         Bump CYGWIN_VERSION_API_MINOR.
295         * include/sys/cygwin.h: Change premain declarations.
296
297         * winsup.h: Move __cplusplus test to after builtin defines.
298
299 2001-03-04  Egor Duda  <deo@logos-m.ru>
300
301         * fhandler.h (class fhandler_tty_common): New mutex and event to
302         syncronize input on master tty with slave tty.
303         * fhandler_tty.cc (fhandler_pty_master::accept_input): Use them to
304         syncronize with slave.
305         * fhandler_tty.cc (fhandler_tty_slave::read): Use input mutex and
306         event to syncronize with master. Do not limit amount of data read
307         from master to vmin value. Interrupt on signal and return already
308         read data, if any.
309         * fhandler_tty.cc (fhandler_tty_slave::open): Handle input mutex and
310         event.
311         * fhandler_tty.cc (fhandler_tty_common::close): Ditto.
312         * fhandler_tty.cc (fhandler_tty_common::set_close_on_exec): Ditto.
313         * fhandler_tty.cc (fhandler_tty_common::fixup_after_fork): Ditto.
314         * fhandler_tty.cc (fhandler_tty_common::dup): Ditto.
315         * tty.h (tty::open_input_mutex): New function.
316         * tty.cc (tty::common_init): Create input mutex and event.
317
318 Fri Mar  2 13:32:00 2001  Corinna Vinschen <corinna@vinschen.de>
319
320         * dir.cc (readdir): Fix creating path in symlink check.
321
322 Fri Mar  2 12:33:00 2001  Corinna Vinschen <corinna@vinschen.de>
323
324         * dir.cc (readdir): Fix shortcut==symlink condition.
325         * environ.cc: Add extern decl for `allow_winsymlinks'.
326         (struct parse_thing): Add entry for `[no]winsymlinks'.
327         * path.cc (symlink): Change to be able to create both,
328         symlink==shortcut and symlink==systemfile, dependent of
329         the setting of `allow_winsymlinks'.
330         * security.cc (cygwin_logon_user): Add debug output.
331         * shortcut.c: Add defines from path.h.
332         (has_exec_chars): Copy from path.h.
333         (check_shortcut): Check for executable file condition if not a
334         shortcut.
335
336 Thu Mar  1 21:06:07 2001  Christopher Faylor <cgf@cygnus.com>
337
338         * exceptions.cc (sig_handle_tty_stop): Ignore attempts to suspend a
339         process if started by non-cygwin parent.
340
341 Thu Mar  1 20:48:11 2001  Christopher Faylor <cgf@cygnus.com>
342
343         * select.cc (peek_console): Don't report read_ready on mouse events
344         unless we are looking for mouse events.
345         * fhandler.h (fhandler_console::mouse_aware): New method.
346
347 Wed Feb 28 15:10:00 2001  Corinna Vinschen <corinna@vinschen.de>
348
349         * uinfo.cc: Eliminate `#include <wchar.h>'.
350
351 2001-02-28  Egor Duda  <deo@logos-m.ru>
352
353         * fhandler_floppy.cc (fhandler_dev_floppy::lseek): Determine
354         drive geometry or partition size to allow seeking from the end of
355         raw floppy device. Don't allow positioning past the end of media or
356         to offsets bigger then max off_t.
357
358 2001-02-27  Egor Duda  <deo@logos-m.ru>
359
360         * fhandler.h (class fhandler_console): Make all variables that
361         describe "state" of console to be members of fhandler_console.
362         default_color is now the color which is set when console recieves
363         reset command.
364         * fhandler_console.cc (fhandler_console::fhandler_console): Turn
365         mouse handling and raw keyboard mode off by default. Initialize
366         state information.
367         * fhandler.cc (fhandler_console::set_raw_win32_keyboard_mode): New
368         function.
369         * fhandler_console.cc (fhandler_console::set_default_attr): New
370         function. Reset console attributes to default values.
371         * fhandler_console.cc (fhandler_console::open): Reset attributes.
372         * fhandler_console.cc (fhandler_console::get_win32_attr): New function.
373         Calculate win32-style console attribute based on terminal attributes.
374         * fhandler_console.cc (fhandler_console::set_cursor_maybe): Use
375         member variable.
376         * fhandler_console.cc (fhandler_console::read): If in raw-win32
377         keyboard mode, encode win32 keyboard events in \033{x;y;z;t;u;wK
378         sequences.
379         * fhandler_console.cc (fhandler_console::dup): Copy all state
380         information to the dup()ed handle.
381         * fhandler_console.cc (fhandler_console::scroll_screen): Use current
382         fill-in attribute.
383         * fhandler_console.cc (fhandler_console::clear_screen): Ditto.
384         * fhandler_console.cc (fhandler_console::char_command): Check if we
385         saw '?' symbol by member variable. Set terminal attributes on \033[Xm
386         commands. \033[24m - turn off underline mode, \033[27m - turn off
387         reverse mode, \033[39m - restore default foreground color.
388         \033[49m - restore default background color. \033[2000h - turn on raw
389         keyboard mode, \033[2000l - turn off raw keyboard mode.
390         * fhandler_console.cc (fhandler_console::write): Set attribues to
391         default values on reset command.
392
393 2001-02-26  Mike Simons  <msimons@moria.simons-clan.com>
394
395         * times.cc (settimeofday): Replace function stub with working code.
396
397 Mon Feb 26 10:42:00 2001  Corinna Vinschen <corinna@vinschen.de>
398
399         * strace.cc (strace::vprntf): Move prntf functionality to this function
400         adding an va_list interface to strace.
401         (strace::printf): Calls strace::vprntf now.
402         (strace_printf): New function providing an extern "C" interface to
403         trace output.
404         * include/sys/strace.h: Make plain C clean.
405         (class strace): Add `vprntf' method.
406
407 Mon Feb 26  0:10:00 2001  Corinna Vinschen <corinna@vinschen.de>
408
409         * shortcut.c: Remove #include <sys/strace.h>.
410
411 Sun Feb 25 10:32:00 2001  Corinna Vinschen <corinna@vinschen.de>
412
413         * path.cc (symlink): Add a ".lnk" suffix regardless. Add a comment.
414
415 Sun Feb 25 10:18:00 2001  Corinna Vinschen <corinna@vinschen.de>
416
417         * shortcut.c (check_shortcut): Change symlink condition.
418
419 Fri Feb 23 10:42:00 2001  Corinna Vinschen <corinna@vinschen.de>
420
421         * mmap.cc (fhandler_disk_file::mmap): Use `addr' correctly.
422         * fhandler_mem.cc (fhandler_dev_mem::mmap): Ditto.
423
424 Thu Feb 22 17:09:00 2001  Corinna Vinschen <corinna@vinschen.de>
425
426         * path.cc (symlink): Keep relative paths relative in the DOS
427         path inside of a shortcut. If that's impossible or the target
428         path is already absolute save an absolute path.
429
430 Thu Feb 22 15:33:00 2001  Corinna Vinschen <corinna@vinschen.de>
431
432         * cygerrno.h: Revert previous patch.
433         * errno.cc: Ditto.
434         * dir.cc: Eliminate `dir_suffixes'.
435         (opendir): Remove usage of `dir_suffixes'.
436         (rmdir): Ditto.
437         * fhandler.cc (fhandler_disk_file::open): Remove usage of
438         `inner_suffixes'.
439         * path.cc: Rename `inner_suffixes' to `lnk_suffixes'.
440         (path_conv::check): Remove usage of `inner_suffixes'.
441         (symlink): Ditto.
442         (symlink_info::check): Handle checking for `.lnk' in path_conv
443         exclusively here.
444         (chdir): Remove usage of `dir_suffixes'.
445         * shortcut.c: Eliminate debug_printf lines.
446         (check_shortcut): Don't set error except on failing ReadFile.
447         * spawn.cc: Remove ".lnk" from `std_suffixes'.
448         * syscalls.cc (_unlink): Remove usage of `inner_suffixes'.
449         Remove ".lnk" from `stat_suffixes'.
450         (_rename): Add check for renaming a symlink to keep the ".lnk"
451         suffix after renaming.
452
453 Thu Feb 22 13:38:00 2001  Corinna Vinschen <corinna@vinschen.de>
454
455         * shortcut.c: New file. Provides a C interface to reading of
456         Windows shortcuts to avoid compiler flag `-fvtable-thunks'.
457         * shortcut.h: Ditto.
458         * Makefile.in: Add shortcut.o to DLL_OFILES.
459         * cygerrno.h: Provide a C interface to `geterrno_from_win_error' for
460         using in shortcut.c.
461         * errno.cc (geterrno_from_win_error): Define as extern "C".
462         * path.cc (struct symlink_info): Remove methods `check_shortcut' and
463         `check_sysfile'.
464         (shortcut_header): Move to shortcut.c.
465         (shortcut_initalized): Ditto.
466         (create_shortcut_header): Ditto.
467         (cmp_shortcut_header): Ditto.
468         (symlink_info::check_shortcut): Ditto. Reorganize as a plain C function.
469         (symlink_info::check_sysfile): Redefine as a global function using the
470         same parameter list as `check_shortcut' for clearness.
471         (symlink_info::check): Change parameter list for calls to
472         `check_shortcut' and `check_sysfile'.
473
474 Thu Feb 22 12:04:00 2001  Corinna Vinschen <corinna@vinschen.de>
475
476         * fhandler.cc (fhandler_disk_file::open): Use `inner_suffixes' when
477         resolving real_path.
478         * path.cc (symlink): Ditto for win32_topath.
479
480 Wed Feb 21 22:41:00 2001  Corinna Vinschen <corinna@vinschen.de>
481
482         * Makefile.in: Add `-lshell32 -luuid' to link pass for new-cygwin1.dll.
483         * autoload.cc: Add LoadDLLinitfunc for ole32.dll.
484         Add LoadDLLfuncEx statements for CoInitialize@4, CoUninitialize@0
485         and CoCreateInstance@20.
486         * dir.cc (dir_suffixes): New datastructure.
487         (readdir): Check for R/O *.lnk files to hide the suffix.
488         (opendir): Use `dir_suffixes' in path conversion.
489         (rmdir): Ditto.
490         * fhandler.cc (fhandler_disk_file::fstat): Add S_IFLNK flag
491         before calling `get_file_attribute'. Take FILE_ATTRIBUTE_READONLY
492         into account only if the file is no symlink.
493         * path.cc (inner_suffixes): New datastructure.
494         (SYMLINKATTR): Eliminated.
495         (path_conv::check): Use `inner_suffixes' on inner path components.
496         (shortcut_header): New global static variable.
497         (shortcut_initalized): Ditto.
498         (create_shortcut_header): New function.
499         (cmp_shortcut_header): Ditto.
500         (symlink): Create symlinks by creating windows shortcuts. Preserve
501         the old code.
502         (symlink_info::check_shortcut): New method.
503         (symlink_info::check_sysfile): Ditto.
504         (symlink_info::check): Check for shortcuts. Move code reading
505         old system attribute symlinks into symlink_info::check_sysfile().
506         (chdir): Use `dir_suffixes' in path conversion.
507         * security.cc (get_file_attribute): Check for S_IFLNK flag.
508         Force 0777 permissions then.
509         * spawn.cc (std_suffixes): Add ".lnk" suffix.
510         * syscalls.cc (_unlink): Use `inner_suffixes' in path conversion.
511         Check for shortcut symlinks to eliminate R/O attribute before
512         calling DeleteFile().
513         (stat_suffixes): Add ".lnk" suffix.
514         (stat_worker): Force 0777 permissions if file is a symlink.
515
516 2001-02-21  Egor Duda  <deo@logos-m.ru>
517
518         * sigproc.cc (getsem): Make semaphore always non-inheritable.
519
520 Mon Feb 19 22:25:53 2001  Christopher Faylor <cgf@cygnus.com>
521
522         * dcrt0.cc (locale_init): Remove.
523
524 2001-02-15  Kazuhiro Fujieda  <fujieda@jaist.ac.jp>
525
526         * cygwin.din: Export rand48 functions.
527         * thread.cc (MTinterface::Init): Remove the initialization of
528         `reent_data'.
529         * dcrt0.cc: Add the initalizer to the declaration of `reent_data'.
530         * include/cygwin/version.h: Bump CYGWIN_VERSION_API_MINOR to 35.
531
532 2001-02-16  Egor Duda  <deo@logos-m.ru>
533
534         * signal.cc (signal): Prohibit setting handlers for SIGKILL and
535         SIGSTOP
536         * signal.cc (sigaction): Ditto
537         * syscalls.cc (_lseek): Return EINVAL on invalid input
538
539 Wed Feb 14 14:54:40 2001 Christophe Iasci <chrisiasci@aol.com>
540
541         * dlfcn.cc (dlopen): Do not call LoadLibrary with a NULL pointer, when
542         the library is not found
543
544 2001-02-14  Egor Duda  <deo@logos-m.ru>
545
546         * fhandler_console.cc (fhandler_console::char_command): Ignore unknown
547         rendition codes in \033[xx;yym control sequences
548
549 Fri Feb  9 23:19:01 2001  Christopher Faylor <cgf@cygnus.com>
550
551         * fork.cc (fork_parent): Return EAGAIN when can't record pid.
552         * pinfo.h (pinfo::remember): Return value of call to proc_subproc.
553         * sigproc.cc (proc_subproc): Return error if can't record pid.
554
555 Fri Feb  9 12:17:27 2001  Christopher Faylor <cgf@cygnus.com>
556
557         * syscalls.cc (mknod): Add valid parameters.
558
559 Thu Feb  8 22:09:00 2001  Corinna Vinschen <corinna@vinschen.de>
560
561         * mmap.cc (mmap): Check for reusing a mapping only on MAP_SHARED
562         and on MAP_PRIVATE|MAP_ANON in the special case of offset 0.
563
564 Thu Feb  8 21:57:00 2001  Corinna Vinschen <corinna@vinschen.de>
565
566         * mmap.cc (class list): Add member `hash'.
567         (list::list): Initialize `hash'.
568         (list::get_list_by_fd): Use filepath hash value to get the correct
569         mapping list if it's not an anonymous mapping.
570         (map::add_list): Initialize `hash' with filepath hash value.
571         (mmap): Check for reusing a mapping only on MAP_SHARED.
572
573 Wed Feb  7 18:47:36 2001  Christopher Faylor <cgf@cygnus.com>
574
575         * signal.cc (killpg): Correct first argument.
576
577 Wed Feb  7 22:22:00 2001  Corinna Vinschen <corinna@vinschen.de>
578
579         * autoload.cc: Add LoadDLLinitfunc for iphlpapi.dll.
580         Add LoadDLLfuncEx statements for GetIfTable@12 and GetIpAddrTable@12.
581         * fhandler_socket.cc (fhandler_socket::ioctl): Move variable
582         definitions to the beginning of the function to allow better debugging.
583         Add handling for SIOCGIFHWADDR, SIOCGIFMETRIC and SIOCGIFMTU.
584         * net.cc: Include iphlpapi.h.
585         (get_2k_ifconf): Rewritten. Uses IP Helper API now.
586         (get_nt_ifconf): Add handling for SIOCGIFHWADDR, SIOCGIFMETRIC
587         and SIOCGIFMTU.
588         (get_95_ifconf): Ditto. Renamed from `get_9x_ifconf'.
589         (get_ifconf): Name loopback `lo' instead of `lo0' as in Linux.
590         Add handling for SIOCGIFHWADDR, SIOCGIFMETRIC and SIOCGIFMTU.
591         Call `get_95_ifconf' only on Windows 95, `get_nt_ifconf' only
592         on Windows NT < Service Pack 3, `get_2k_ifconf otherwise.
593         * include/asm/socket.h: Add defines for SIOCGIFHWADDR, SIOCGIFMETRIC
594         and SIOCGIFMTU.
595         * include/cygwin/if.h: Add `ifr_hwaddr', `ifr_metric' and `ifr_mtu'.
596         (struct ifreq): Add `ifru_hwaddr'.
597
598 Tue Feb  6 15:04:00 2001  Corinna Vinschen <corinna@vinschen.de>
599
600         * syscalls.cc (stat_worker): Add a check for the special case when
601         a process creates a file using mode 000 using ntsec.
602
603 Mon Feb  5 17:00:00 2001  Corinna Vinschen <corinna@vinschen.de>
604
605         * fhandler.cc (fhandler_base::open): Always add GENERIC_READ access
606         when opening raw disk devices.
607         * fhandler_floppy.cc (fhandler_dev_floppy::lseek): Implement bytewise
608         access.
609         * fhandler_raw.cc (fhandler_dev_raw::open): Always open raw disk device
610         binary.
611         (fhandler_dev_raw::raw_write): Don't drop read buffer content when
612         writing after read.
613
614 Mon Feb  5 13:30:00 2001  Corinna Vinschen <corinna@vinschen.de>
615
616         * mmap.cc (mmap_record::fixup_map): New method to duplicate
617         the memory protection in a just forked child.
618         (mmap): Realign gran_len to page boundary only on anonymous
619         mapping before saving in the mmap_record.
620         (munmap): Cleanup code.
621         (msync): Ditto.
622         (fixup_mmaps_after_fork): Ditto. Call mmap_record::fixup_map now.
623
624 Thu Feb  1 23:08:29 2001  Christopher Faylor <cgf@cygnus.com>
625
626         * cygheap.cc (creturn): Correctly calculate cygheap_max.
627
628 Wed Jan 31 10:04:58 2001  Christopher Faylor <cgf@cygnus.com>
629
630         * shared.cc (shared_info::initialize): Reduce size of heap.
631
632 Wed Jan 31 13:22:00 2001  Corinna Vinschen <corinna@vinschen.de>
633
634         * include/sys/resource.h: Fix typo.
635
636 Wed Jan 31 13:20:00 2001  Corinna Vinschen <corinna@vinschen.de>
637
638         * include/sys/resource.h: Add RLIMIT_NLIMITS and RLIM_NLIMITS.
639
640 Tue Jan 30 18:15:23 2001  Christopher Faylor <cgf@cygnus.com>
641
642         * include/cygwin/version.h: Bump version to 1.3.0.
643
644 Tue Jan 30  8:55:00 2001  Corinna Vinschen <corinna@vinschen.de>
645
646         * pinfo.cc (pinfo::init): Use INVALID_HANDLE_VALUE instead of
647         explicit cast (HANDLE) 0xffffffff.
648         * shared.cc (open_shared): Ditto.
649
650 Mon Jan 29 17:15:22 2001  Bill Hegardt <bill@troyxcd.com>
651
652         * fhandler_serial.cc (raw_write): Use local copy of OVERLAPPED
653         structure instead of shared structure to fix a race condition between
654         read/write.
655
656 Mon Jan 29 14:30:00 2001  Corinna Vinschen <corinna@vinschen.de>
657
658         * mmap.cc (mmap): Remove obsolete check for MAP_SHARED|MAP_ANON as
659         being invalid.
660
661 Mon Jan 29 10:23:00 2001  Corinna Vinschen <corinna@vinschen.de>
662
663         * mmap.cc (mmap_record::find_empty): Fix loop condition.
664
665 Sun Jan 28 19:40:40 2001  Christopher Faylor <cgf@cygnus.com>
666
667         * syscalls.cc (_link): Make sure that newpath does not exist.  Set
668         errno if it does.
669
670 Sun Jan 28 19:29:08 2001  Christopher Faylor <cgf@cygnus.com>
671
672         * cygheap.cc (init_cheap): Don't specify a load address for the heap.
673         It doesn't work on #!*& Windows 9x.
674         (cygheap_init): Move GetUserName to memory_init.
675         * dcrt0.cc (dll_crt0_1): Call new memory_init functin, eliminate call
676         to heap_init.
677         * heap.cc (heap_init): Improve error output.
678         * heap.h: Correct some declarations.
679         * shared.cc (mount_table_init): Remove.
680         (memory_init): Renamed from shared_init.  Reorganize to accomodate
681         strange Windows 9x problems with cygheap/heap interaction.
682         * shared_info.h: Rename shared_init to memory_init.
683
684 Sun Jan 28 01:25:33 2001  Christopher Faylor <cgf@cygnus.com>
685
686         * include/cygwin/version.h: Bump API version.
687
688 Sun Jan 28 01:18:22 2001  Christopher Faylor <cgf@cygnus.com>
689
690         * cygheap.cc (init_cheap): Move username initialization.
691         (cygheap_init): Here.
692         * shared_info.h (mount_info): Add a sys_mount_table_counter field.
693         (shared_info): Ditto.
694         * path.cc (mount_info::conv_to_win32_path): Check that our mount table
695         is in sync with the system mount table and reinitialize it if not.
696         (mount_info::add_reg_mount): Bump sys_mount_table counters if the
697         system mount table changes.
698         (mount_info::del_reg_mount): Ditto.
699         (mount_info::write_cygdrive_info_to_registry): Ditto.
700         (mount_info::remove_cygdrive_info_from_registry): Ditto.
701
702 Sun Jan 28 00:28:30 2001  Christopher Faylor <cgf@cygnus.com>
703
704         Throughout, change 'cygwin_shared.mount' to 'mount_table'.
705         * child_info.h (child_info): Move shared_h, console_h to cygheap.  Add
706         mount_h.
707         * cygheap.h (init_cygheap): Add shared_h, console_h.
708         * cygheap.cc (init_cheap): Initialize heap at a fixed location after
709         the shared memory regions.  Initialize cygheap->user name here.
710         * dcrt0.cc (dll_crt0_1): Call getpagesize () to initialize constants.
711         Remove cygheap_init since it is done in shared_init now.
712         (_dll_crt0): Initialize mount_h, remove shared_h and console_h
713         initialization.
714         * fhandler_console.cc (console_shared_h): Eliminate.
715         (get_tty_stuff): Use cygheap->console_h rather than console_shared_h.
716         * heap.cc (heap_init): Use page size constant calculated earlier in
717         initialization.
718         * shared.cc: Eliminate cygwin_shared_h.  Add cygwin_mount_h.
719         (mount_table_init): New function for initializing a user mount table.
720         (open_shared_file_map): Use constant for shared memory region.
721         Initialize cygheap and mount table here.
722         (open_shared): Improve debugging output.
723         (shared_info::initialize): Eliminate call to mount.init.
724         (shared_terminate): Use cygheap->shared_h.  Close cygwin_mount_h.
725         (open_shared_file_map): Eliminate.
726         * shared_info.h (mount_info): Add a version field.
727         (shared_align_past): New macro for calculating location for shared
728         memory regions.
729         * sigproc.cc (init_child_info): Eliminate shared_h, console_h.
730         * spawn.cc (spawn_guts): Pass on cygwin_mount_h iff not a different
731         user.
732         * syscalls.cc (system_info): New global holding system memory defaults.
733         (getpagesize): Use system_info.
734         * uinfo.cc (internal_getlogin): Only fill in user name if nonexistent.
735         * winsup.h: Declare system_info.
736
737         * passwd.cc (read_etc_passwd): Use cygheap->user.name () rather than
738         retrieving the name again.
739
740 Sat Jan 27 10:18:02 2001  Christopher Faylor <cgf@cygnus.com>
741
742         * path.cc (path_conv::check): Detect when path has symlinks.
743         (symlink_info::check): Remove debugging stuff.
744         (chdir): Use posix'ized win32 path if cd'ed to a path using symlinks.
745
746 Fri Jan 26 21:20:28 2001  Christopher Faylor <cgf@cygnus.com>
747
748         * exceptions.cc (sigreturn): Call any pending signals prior to
749         resetting the signal mask so that stacked signals behave correctly.
750         (sigdelayed): Avoid a race where a signal could end up calling an
751         incorrect signal handler if two signals come in close together.
752
753 Tue Jan 23 21:56:00 2001  Corinna Vinschen <corinna@vinschen.de>
754
755         * mmap.cc (fhandler_disk_file::mmap): Call CreateFileMapping with
756         len != 0 only when performing an anonymous mapping.
757
758 Mon Jan 22 15:35:28 2001  Christopher Faylor <cgf@cygnus.com>
759
760         * path.h: Add a new constant.
761         * syscalls.cc (_read): Oscillate errno check.
762
763 Mon Jan 22 15:27:12 2001  Christopher Faylor <cgf@cygnus.com>
764
765         * include/cygwin/version.h: Bump API to reflect setlogmask.
766
767 Sun Jan 21 22:40:25 2001  Jason Tishler <jt@dothill.com>
768
769         * cygwin.din: Add export for setlogmask().
770         * syslog.cc (setlogmask): New function.
771
772 Thu Jan 18 10:27:00 2001  Corinna Vinschen <corinna@vinschen.de>
773
774         * resource.cc (setrlimit): Support RLIMIT_NOFILE.
775
776 Wed Jan 17 23:23:12 2001  Christopher Faylor <cgf@cygnus.com>
777
778         * syscalls.cc (setdtablesize): Call with amount to increment not total
779         amount.  Return success or failure error code.
780
781 Wed Jan 17 09:47:13 2001  Christopher Faylor <cgf@cygnus.com>
782
783         * autoload.cc (LoadDLLinitfunc): Remove debugging statement.
784
785         * exceptions.cc (sig_handle_tty_stop): Move setting of PID_STOPPED to
786         earlier in interrupt.
787         ((interrupt_setup): i.e., here.
788         (sig_handle): Don't queue multiple SIGSTOPS.
789         * fhandler.h (bg_check_types): Enumerate return value of bg_check for
790         clarity.
791         * signal.cc (kill_pgrp): Minor cleanup.
792         * fhandler_termios.cc (fhandler_termios::bg_check): Use enumerated type
793         for function return.  Don't raise signal if a signal is already queued.
794         * fhandler_console.cc (fhandler_console::read): Use enumerated return
795         type for bg_check.
796         * select.cc: Ditto, throughout.
797         * read.cc: Ditto, throughout.
798         * termios.cc: Ditto, throughout.
799         (_read): YA interrupt detect simplification.
800         * wait.cc (wait4): Ditto.
801
802 Wed Jan 17 10:56:00 2001  Corinna Vinschen <corinna@vinschen.de>
803
804         * cygheap.cc (cygheap_user::~cygheap_user): Temporarily
805         disable free'ing memory.
806
807 Tue Jan 16 18:01:00 2001  Corinna Vinschen <corinna@vinschen.de>
808
809         * mmap.cc (mmap): Initialize fh to avoid compiler warnings.
810
811 Mon Jan 15 21:07:00 2001  Christopher Faylor <cgf@cygnus.com>
812
813         * wait.cc (wait4): Rename variable for consistency.  Allow restartable
814         signal behavior.
815
816 Mon Jan 15 23:15:00 2001  Corinna Vinschen <corinna@vinschen.de>
817
818         * mmap.cc (mmap): Add more parameter checking. Change error output
819         in case of EINVAL. Treat mmapping /dev/zero like MAP_ANONYMOUS.
820
821 Mon Jan 15 20:34:00 2001  Corinna Vinschen <corinna@vinschen.de>
822
823         * mmap.cc: include <unistd.h>. Define some bit operations for
824         the new page map.
825         (mmap_record): Change type of base_address_ to caddr_t.
826         Add map_map_ member. Add several methods to manipulate map_map_.
827         (mmap_record::alloc_map): New method.
828         (mmap_record::free_map): Ditto.
829         (mmap_record::find_empty): Ditto.
830         (mmap_record::map_map): Ditto.
831         (mmap_record::unmap_map): Ditto.
832         (list::add_record): Change return type to `mmap_record *'.
833         Allocate page map.
834         (list::match): New method.
835         (mmap): Partly rewritten to take care for the new page map. Add some
836         parameter checking.
837         (munmap): Ditto.
838
839 Mon Jan 15 13:50:00 2001  Corinna Vinschen <corinna@vinschen.de>
840
841         * heap.cc (heap_init): Fix extern declaration of getpagesize.
842         * syscalls.cc (getpagesize): Fix another typo.
843
844 Mon Jan 15 12:48:00 2001  Corinna Vinschen <corinna@vinschen.de>
845
846         * syscalls.cc (getpagesize): Save pagesize in global variable to
847         avoid calling GetSystemInfo too often.
848         * heap.cc (getpagesize): Eliminate.
849         (heap_init): Use getpagesize function from syscalls.cc.
850
851 Mon Jan 15 11:56:00 2001  Corinna Vinschen <corinna@vinschen.de>
852
853         * sysconf.cc (sysconf): return `getpagesize ()' on _SC_PAGESIZE
854         request to avoid implementing the same twice.
855
856 Sun Jan 14 14:07:50 2001  Christopher Faylor <cgf@cygnus.com>
857
858         * syscalls.cc (_read): Use more lightweight method for determining if
859         read has been interrupted by a signal.
860
861 Fri Jan 12 00:35:15 2001  Christopher Faylor <cgf@cygnus.com>
862
863         * debug.h: Add regparm attributes to some functions.
864
865         * signal.cc (sigaction): Don't treat SIGCONT specially.
866
867         * exceptions.cc (interrupt_setup): Save sa_flags of interrupted signal
868         for later use.
869         (sig_handler): Default any stopping signal to SIGSTOP.
870         (call_signal_handler): New function.
871         (sigdelayed0): New function.
872         * sigproc.cc (sigproc_init): Initialize SIGSTOP sigaction for special
873         behavior.
874         * sigproc.h: Define call_signal_handler.
875         * syscalls.cc (_read): Allow restartable signal behavior.
876
877 Thu Jan 11 13:17:00 2001  Corinna Vinschen <corinna@vinschen.de>
878
879         * fhandler.h (fhandler_base): New method `fixup_mmap_after_fork'.
880         (fhandler_disk_file: Ditto.
881         (fhandler_dev_mem): Ditto.
882         * fhandler_mem.cc (fhandler_dev_mem::open): Set OBJ_INHERIT attribute
883         for device\physicalmemory handle.
884         (fhandler_dev_mem::mmap): Ditto.
885         * fhandler_mem.cc (fhandler_dev_mem::fixup_mmap_after_fork): New
886         method.
887         * mmap.cc (mmap_record): Add private `fdesc_' member.  Change
888         constructor accordingly.
889         (get_fd): New method.
890         (mmap): Use new mmap_record constructor.
891         (fhandler_base::fixup_mmap_after_fork): New method.
892         (fhandler_disk_file::fixup_mmap_after_fork): Ditto.
893         (fixup_mmaps_after_fork): Call `fixup_mmap_after_fork' of appropriate
894         fhandler class.
895
896 Wed Jan 10 22:08:30 2001  Kazuhiro Fujieda  <fujieda@jaist.ac.jp>
897
898         * sigproc.cc (wait_sig): Allow SIGCONT when stopped.
899
900 Tue Jan  9 16:55:00 2001  Corinna Vinschen <corinna@vinschen.de>
901
902         Patch suggested by René Møller Fonseca <fonseca@mip.sdu.dk>
903         * include/sys/socket.h: Change prototype to have 2nd parameter `const'.
904         * net.cc (cygwin_bind): Change 2nd parameter to `const'.
905
906 Sun Jan  7 22:59:37 2001  Christopher Faylor <cgf@cygnus.com>
907
908         * pinfo.cc (codepage_init): Move function.
909         * environ.cc (codepage_init): To here.
910         * exceptoins.cc (SIG_NONMASKABLE): Remove SIGCONT from consideration
911         since it is supposed to be maskable.
912         * signal.cc (sigaction): Ditto.
913         * sigproc.cc (wait_sig): Ditto.
914         * winsup.h: Eliminate global declaration of codepage_init.
915
916 Thu Jan  5  9:33:00 2001  Corinna Vinschen <corinna@vinschen.de>
917
918         * resource.cc (getrlimit): Set errno on EFAULT instead of returning
919         it.
920         (setrlimit): Ditto.
921
922 Thu Jan  5  3:38:00  2001  David Sainty <David.Sainty@optimation.co.nz>
923
924         * resource.cc (setrlimit): Prevent failing with an error when the
925         operation would not have changed anything.
926
927 Thu Jan  4 10:29:54  2001  Earnie Boyd  <earnie_boyd@yahoo.com>
928
929         * thread.cc: Need LONG_MAX definition.
930
931 Wed Jan  3 13:47:23 2001  Christopher Faylor <cgf@cygnus.com>
932
933         * thread.cc (MTinterface::CreateSemaphore): Correctly set semaphore
934         max.
935
936 Wed Jan  3 09:44:51 2001  Christopher Faylor <cgf@cygnus.com>
937
938         * fhandler_console.cc (fhandler_console::read): Restore missing test
939         for code page before doing OemToCharBuff.
940
941 Wed Jan  3 09:20:20 2001  Jason Tishler <jt@dothill.com>
942
943         * include/cygwin/version.h: Fix typo in CYGWIN_VERSION_DLL_COMBINED
944         macro.