]> sourceware.org Git - newlib-cygwin.git/blame - winsup/cygwin/ChangeLog
Patch by Kazuhiro Fujieda <fujieda@jaist.ac.jp>:
[newlib-cygwin.git] / winsup / cygwin / ChangeLog
CommitLineData
1ff87985
CV
1Sun Apr 15 15:56:00 2001 Corinna Vinschen <corinna@vinschen.de>
2
3 * path.cc (add_ext_from_sym): Redefine to call `add_ext_from_sym_'.
4 (add_ext_from_sym_): New inline function.
5
34bbe838
CF
6Sat Apr 14 19:23:52 2001 Christopher Faylor <cgf@cygnus.com>
7
8 * config.h.in: Turn on VFORK by default.
9
266be1d8
CF
10Sat Apr 14 18:04:35 2001 Christopher Faylor <cgf@cygnus.com>
11
12 * net.cc (cygwin_socket): Set SO_LINGER to small value so closed UNIX
13 domain sockets will not stay around.
14
15Sat Apr 14 18:01:43 2001 Pierre A. Humblet <Pierre.Humblet@ieee.org>
16
17 * select.cc (socket_cleanup): Set SO_LINGER to small value so closed
18 dummy sockets do not stay around. Use correct value for second argument
19 to shutdown.
20
e6b98fc8
RC
21Sat Apr 14 17:04:00 2001 Robert Collins <rbtcollins@hotmail.com>
22
23 * thread.h (MTinterface): Add threadcount.
24 * thread.cc (MTinterface::Init): Set threadcount to 1.
25 (__pthread_create): Increment threadcount.
26 (__pthread_exit): Decrement threadcount and call exit() from the last thread.
27
1114d472 28Fri Apr 13 11:34:24 2001 Robert Collins <rbtcollins@hotmail.com>
39b6859a
CF
29
30 * fork.cc (fork_child): Call the __pthread_atforkchild function.
31 (fork_parent): Call the __pthread_atforkparent function.
32 * cygwin.din: Export pthread_atfork.
33 * thread.h (callback): New class.
34 (MTinterface): Use it.
35 * thread.cc (__pthread_atforkprepare): New function.
36 (__pthread_atforkparent): New function.
37 (__pthread_atforkchild): New function.
38 (__pthread_atfork): New function.
39 * pthread.cc (pthread_atfork): New function.
40
e61cead3
CV
41Fri Apr 13 9:52:00 2001 Corinna Vinschen <corinna@vinschen.de>
42
43 * path.cc (add_ext_from_sym): New define evaluating `known'suffix'.
44 (path_conv::check): Use add_ext_from_sym throughout.
45
46Thu Apr 12 23:19:00 2001 Corinna Vinschen <corinna@vinschen.de>
70c370d6
CV
47
48 * dir.cc (mkdir): Check for case clash.
49 * environ.cc: Add extern declaration for `pcheck_case'.
50 (check_case_init): New function.
51 (struct parse_thing): Add "check_case" option.
52 * errno.cc (_sys_nerrlist): Add text for ECASECLASH.
53 (strerror): Add case branch for ECASECLASH.
54 * fhandler.cc (fhandler_disk_file::open): Check for case clash.
55 * path.cc: Add global variable `pcheck_case'.
56 (struct symlink_info): Add member `case_clash' and method `case_check'.
57 (path_prefix_p_): Call `pathnmatch' instead of `strncasematch'.
58 (pathnmatch): New funtion.
59 (pathmatch): Ditto.
60 (path_conv::check): Add handling for case checking.
61 (symlink): Check for case clash.
62 (symlink_info::check): Add parameter for case checking.
63 Handle case checking.
64 (symlink_info::case_check): New method.
65 (chdir): Don't use unconverted path if pcheck_case==PCHECK_STRICT.
66 * path.h: Add extern declarations for `pathmatch' and
67 `pathnmatch'.
68 (enum case_checking): New enumeration type describing
69 the case checking behaviour of path conversion routines.
70 (class path_conv): Add member `case_clash'.
71 * syscalls.cc (_link): Check for case clash.
72
82d4a5d4
CF
73Thu Apr 12 12:49:53 2001 Christopher Faylor <cgf@cygnus.com>
74
75 * syscalls.cc (mkfifo): New function stub.
76
aa67fd12
CF
772001-04-12 Robert Collins <rbtcollins@hotmail.com>
78
79 * configure.in: Remove PTH_ALLOW.
80 * cygwin.din: Remove @PTH_ALLOW@ prefixes to pthread functions. Add
81 new pthread exports.
82 * pthread.cc: New wrapper functions for the above new exports.
83 * sched.cc (valid_sched_parameters): New function.
84 (sched_setparam): Use it.
85 (sched_set_thread_priority): New function. Used by pthread_sched*.
86 * thread.cc (pthread_key_destructor::InsertAfter): New function.
87 (pthread_key_destructor::UnlinkNext): New function.
88 (pthread_key_destructor::Next): New function.
89 (pthread_key_destructor_list::Insert): New function.
90 (pthread_key_destructor_list::Remove): New function.
91 (pthread_key_destructor_list::Pop): New function.
92 (pthread_key_destructor::pthread_key_destructor): New function.
93 (pthread_key_destructor_list::IterateNull): New function.
94 (MTinterface::Init): Initialise new member.
95 (pthread::pthread): Initialise new members.
96 (pthread::create): Copy new attributes. Set the new thread priority.
97 (pthread_attr::pthread_attr): Initialise new members.
98 (pthread_key::pthread_key): Setup destructor function.
99 (pthread_key::~pthread_key): Remove destructor function.
100 (pthread_mutexattr::pthread_mutexattr): New function.
101 (pthread_mutexattr::~pthread_mutexattr): New function.
102 (__pthread_once): New function.
103 (__pthread_cleanup): New function.
104 (__pthread_cancel): New function.
105 (__pthread_setcancelstate): New function.
106 (__pthread_setcanceltype): New function.
107 (__pthread_testcancel): New function.
108 (__pthread_attr_getinheritsched): New function.
109 (__pthread_attr_getschedparam): New function.
110 (__pthread_attr_getschedpolicy): New function.
111 (__pthread_attr_getscope): New function.
112 (__pthread_attr_setinheritsched): New function.
113 (__pthread_attr_setschedparam): New function.
114 (__pthread_attr_setschedpolicy): New function.
115 (__pthread_attr_setscope): New function.
116 (__pthread_exit): Call any key destructors on thread exit.
117 (__pthread_join): Use the embedded attr values.
118 (__pthread_detach): Use the embedded attr values.
119 (__pthread_getconcurrency): New function.
120 (__pthread_getschedparam): New function.
121 (__pthread_key_create): Pass the destructor on object creation.
122 (__pthread_key_delete): Correct incorrect prototype.
123 (__pthread_setconcurrency): New function.
124 (__pthread_setschedparam): New function.
125 (__pthread_cond_timedwait): Support static mutex initialisers.
126 (__pthread_cond_wait): Ditto.
127 (__pthread_mutex_getprioceiling): New function.
128 (__pthread_mutex_lock): Support static mutex initialisers.
129 (__pthread_mutex_trylock): Ditto.
130 (__pthread_mutex_unlock): Ditto.
131 (__pthread_mutex_destroy): Ditto.
132 (__pthread_mutex_setprioceiling): New function.
133 (__pthread_mutexattr_getprotocol): New function.
134 (__pthread_mutexattr_getpshared): New function.
135 (__pthread_mutexattr_gettype): New function.
136 (__pthread_mutexattr_init): New function.
137 (__pthread_mutexattr_destroy): New function.
138 (__pthread_mutexattr_setprotocol): New function.
139 (__pthread_mutexattr_setprioceiling): New function.
140 (__pthread_mutexattr_getprioceiling): New function.
141 (__pthread_mutexattr_setpshared): New function.
142 (__pthread_mutexattr_settype): New function. Remove stubs for non
143 MT_SAFE compilation.
144 * thread.h: Remove duplicate #defines. Add prototypes for new
145 functions in thread.cc.
146 (pthread_key_destructor): New class.
147 (pthread_key_destructor_list): New class.
148 (pthread_attr): Add new members.
149 (pthread): Remove members that are duplicated in the pthread_attr
150 class.
151 (pthread_mutex_attr): Add new members.
152 (pthread_once): New class.
153 * include/pthread.h: Add prototypes for new functions exported from
154 cygwin1.dll. Remove typedefs.
155 * include/sched.h: Add prototypes for new functions in sched.cc.
156 * include/cygwin/types.h: Add typedefs from pthread.h
157
fc672fb2
CF
158Tue Apr 10 22:02:53 2001 Christopher Faylor <cgf@cygnus.com>
159
160 * path.cc (struct symlink_info): Add extn and ext_tacked_on fields.
161 (path_conv::check): Only tack on extension if a known one didn't
162 already exist.
163 (suffix_scan::has): Return pointer to known extension.
164 (symlink_info::check): Record location of extension, if any.
165
619f7fa0
ED
1662001-04-09 Egor Duda <deo@logos-m.ru>
167
168 * fhandler.h (class fhandler_socket): Add members and methods to
169 support secure connections on AF_UNIX sockets.
170 * fhandler_socket.cc (fhandler_socket::set_connect_secret): New method.
171 (fhandler_socket::get_connect_secret): Ditto.
172 (fhandler_socket::create_secret_event): Ditto.
173 (fhandler_socket::close_secret_event): Ditto.
174 (fhandler_socket::check_peer_secret_event): Ditto.
175 (fhandler_socket::fixup_after_fork): Duplicate secret event to child.
176 (fhandler_socket::dup): Copy address family.
177 (fhandler_socket::close): Close secret event.
178 * net.cc (get_inet_addr): Read secret cookie.
179 (cygwin_connect): Check if peer knows secret cookie value.
180 (cygwin_accept): Ditto. Copy address family to newly created socket.
181 (cygwin_bind): Generate and write secret cookie.
182 (wsock_init): Initialize random number generator.
183
aa970c61
CF
184Sun Apr 8 20:40:58 2001 Christopher Faylor <cgf@cygnus.com>
185
186 * Makefile.in: Put -lgcc last in list of libraries, since stdc++
187 library needs it.
188 * cygwin.din: Remove obsolete "__empty" export.
189 * exceptions.cc (call_signal_handler_now): Force inclusion of function
190 even when -finline-functions is specified.
191 * sigproc.h: Remove obsolete call_signal_handler declaration.
192
193Sun Apr 8 20:36:55 2001 Benjamin Riefenstahl <Benjamin.Riefenstahl@epost.de>
e3eef4d0 194
aa970c61
CF
195 * fhandler_console.cc (cp_get_internal): New function.
196 (cp_convert): New function.
197 (con_to_str): New function.
198 (str_to_con): New function.
199 (fhandler_console::read): Replace OemToCharBuff with con_to_str.
200 (fhandler_console::write_normal): Replace CharToOemBuff with str_to_con.
201
9ddfe5a0
CV
202Thu Apr 5 22:41:00 2001 Corinna Vinschen <corinna@vinschen.de>
203
204 * syscalls.cc (stat_worker): Fix conditional which still allowed
205 successful stat'ing of non-existant files.
206
0403bb74
CF
207Wed Apr 4 10:37:44 2001 Christopher Faylor <cgf@cygnus.com>
208
209 * child_info.h: Bump magic number for fork/exec/spawn.
210
c196a1a2
CV
211Tue Apr 3 20:06:00 2001 Corinna Vinschen <corinna@vinschen.de>
212
213 * errno.cc (errmap): Map ERROR_FILE_INVALID to ENXIO.
214
c90e420d
CF
215Mon Apr 2 22:48:58 2001 Christopher Faylor <cgf@cygnus.com>
216
217 * cygrun.c (main): Fix compiler warning.
218 * gmon.c (_mcleanup): Ditto.
219 * profil.c (profile_off): Ditto.
220
221 * net.cc (find_winsock_errno): New function.
222 (__set_winsock_errno): Use find_winsock_errno.
223 (cygwin_setsockopt): Detect SO_ERROR for debugging.
224 (cygwin_getsockopt): Ditto. Translate error when getsockopt returns
225 SO_ERROR.
226 * winsup.h: regparmize __set_winsock_errno.
227 * include/sys/strace.h: Document that strace functions can't use
228 regparm.
229
0f0a7dc9
CV
2302001-04-02 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
231
232 * fhandler.cc (fhandler_disk_file::open): Avoid checking a magic
233 number of a directory.
234
f97adf98
CF
235Mon Apr 2 00:24:08 2001 Christopher Faylor <cgf@cygnus.com>
236
237 * shared_info.h (mount_info): Remove mnt_ elements.
238 * thread.h (struct _winsup_t): Add mnt_ elements.
239 * path.cc (fillout_mntent): Use mnt_ elements from reent_winsup ().
240
1ba3935d
CF
241Sun Apr 1 20:10:34 2001 Christopher Faylor <cgf@cygnus.com>
242
243 * exceptions.cc (sigframe::call_signal_handler): Return value of
244 call_signal_handler_now.
245 * sigproc.h (sigframe): Use constructor.
246 * syscalls.cc (_read): Correct errno test prior to calling signal
247 handler.
248
2a1743c7
CF
249Sun Apr 1 00:38:06 2001 Christopher Faylor <cgf@cygnus.com>
250
0ef785e4 251 * exceptions.cc (sigframe::call_signal_handler): Move outside of "C"
2a1743c7
CF
252 block or some compilers will complain.
253
11f3a79b
CF
254Sun Apr 1 00:24:14 2001 Christopher Faylor <cgf@cygnus.com>
255
256 * exceptions.cc (call_signal_handler_now): Rename from
257 call_signal_handler to avoid C++ confusion.
258
5817ee2d
CF
259Sun Apr 1 00:08:15 2001 Christopher Faylor <cgf@cygnus.com>
260
261 * path.cc (fillout_mntent): Always remove drive root directories from
262 future consideration by "/cygdrive" reporting.
263 (cygdrive_getmnt): Avoid reporting removable drives or drives with no
264 media mounted.
265
f2aeff27
CF
266Sat Mar 31 21:56:19 2001 Christopher Faylor <cgf@cygnus.com>
267
268 * thread.h (struct _winsup_t): Remove obsolete elements. Add
269 available_drives element.
270 * path.cc (mount_info::getmntent): Report "/cygdrive" drives when
271 mounted drives are exhausted.
272 (fillout_mntent): New function.
273 (mount_item::getmntent): Use fillout_mntent.
274 (cygdrives_mntent): New function. Returns next available "/cygdrive".
275 (setmntent): Initialize available "/cygdrives".
276 * syscalls.cc: Remove some if 0'ed code.
277 * times.cc (timezone): Use more descriptive variable name.
278
f6111483
CF
279Sat Mar 31 18:59:52 2001 Christopher Faylor <cgf@cygnus.com>
280
281 * sigproc.h (class sigframe): Implement 'unregister()' method.
282 (sigframe::~sigframe): Use unregister method.
283 (sigframe::call_signal_handler): Declare new method.
284 * exceptions.cc (sigframe::call_signal_handler): New method.
285 Unregisters current sigframe before calling signal handler.
286 (setup_handler): Clear waiting threads prior to arming signal_arrived.
287 * syscalls.cc (_read): Change goto to loop. Recalculate sigframe
288 inside of loop so that constructor is called when appropriate.
289 * wait.cc (wait4): Ditto.
290
291 * signal.cc: Change "sig" to "signal" in debugging messages throughout.
292 * sigproc.cc: Ditto.
293
ab57d146
CF
294Sat Mar 31 17:12:08 2001 Christopher Faylor <cgf@cygnus.com>
295
296 * fhandler_serial.cc (fhandler_serial::raw_write): Close protected
297 handles with ForceCloseHandle or suffer spurious warnings.
298
0cec3226
CF
299Sat Mar 31 16:23:32 2001 Christopher Faylor <cgf@cygnus.com>
300
301 * fhandler.cc (fhandler_base::read): Remove special handling of CTRL-Z.
302
70afbaae
CV
303Sat Mar 31 11:09:00 2001 Corinna Vinschen <corinna@vinschen.de>
304
305 * fhandler.h (class fhandler_console): Add members `insert_mode'.
306 * fhandler_console.cc (fhandler_console::dup): Duplicate `insert_mode'.
307 (fhandler_console::fhandler_console): Initialize `insert_mode'.
c796f4f1 308 (fhandler_console::char_command): Add terminal capabilities
70afbaae
CV
309 "enter insert mode" = \E[4h and "exit insert mode" = \E[4l.
310 Care for insert mode on terminal capability "repeat char" = \E[x;yb.
311 (fhandler_console::write_normal): Care for insert mode before writing
312 to the console.
313 (array keytable): Add keymapping for modified cursor and control
314 block keys (xterm like).
315
f42da31a
CV
316Fri Mar 30 13:02:00 2001 Corinna Vinschen <corinna@vinschen.de>
317
318 * fhandler.h (class fhandler_console): Add members `savebufsiz' and
319 `savebuf' to allow save/restore of screen.
70afbaae
CV
320 * fhandler_console.cc (fhandler_console::dup): Duplicate `savebufsiz'
321 and `savebuf'.
f42da31a
CV
322 (fhandler_console::fhandler_console): Initialize `savebufsiz' and
323 `savebuf'.
324 (fhandler_console::char_command): Add terminal capabilities
325 "save screen content" = \E[?47h and "restore screen content" = \E[?47l.
326
b5eb3d0f
CF
327Wed Mar 28 19:28:50 2001 Christopher Faylor <cgf@cygnus.com>
328
329 * path.cc (chdir): Eat trailing whitespace on input path.
330
1ac6d1a1
CF
331Tue Mar 27 22:38:42 2001 Christopher Faylor <cgf@cygnus.com>
332
333 * lib/_cygwin_S_IEXEC.c: Remove "const" from globals or they never seem
334 to be defined. Wrap definitions in extern "C". Include winsup.h to
335 assure proper definitions.
336
337 * dcrt0.cc (dll_crt0_1): Call stdio_init after premain run so that
338 binmode.o, etc., will control default stdio settings.
339 * dtable.cc (dtable::init_std_file_from_handle): Allow __fmode to force
340 binmode/textmode settings. Default pipes to binmode.
341
37a2d97a
CV
342Tue Mar 27 11:31:00 2001 Corinna Vinschen <corinna@vinschen.de>
343
344 * mmap.cc (mmap): Fix conditional for previous patch.
345
1636a5a1
CV
346Mon Mar 26 18:48:00 2001 Corinna Vinschen <corinna@vinschen.de>
347
348 * mmap.cc (mmap): Outflank copy-on-write problem on 9x by
349 setting access mode to FILE_MAP_READ when read access is requested.
350
aa73152e
CF
351Sun Mar 25 20:12:21 2001 Christopher Faylor <cgf@cygnus.com>
352
353 * dlfcn.cc (check_access): Eliminate.
354 (check_path_access): Use passed in path_conv buf.
355 (get_full_path_of_dll): Use passed in name buf to avoid a static. Rip
356 out most of the path checking since LoadLibrary will do all of this
357 automatically.
358 (dlopen): Set errno when appropriate (may not be compliant?).
359 * environ.cc (posify): Don't pass in "native" path if it seems to
360 actually be posix.
361
db0421f6
CF
362Thursday Mar 22 2001 Robert Collins <rbtcollins@hotmail.com>
363
364 * fhandler.h (fhandler_dev_clipboard): Extend to support writing.
365 * fhandler_clipboard.cc (fhandler_dev_clipboard::fhandler_dev_clipboard):
366 Initialize new fields. Open clipboard here.
367 (fhandler_dev_clipboard::dup): New method.
368 (fhandler_dev_clipboard::open): Accomodate new fields. Register
369 clipboard here, if appropriate.
370 (set_clipboard): New function. Moves buffer to clipboard.
371 (fhandler_dev_clipboard::write): Truly implement clipboard writing.
372 (fhandler_dev_clipboard::read): Reimplement to allow successive reads.
373 (fhandler_dev_clipboard::lseek): Truly implement seeks in clipboard.
0ed560cb
CF
374 (fhandler_dev_clipboard::close): Clear out new fields. Support
375 sequential reads and sequential writes. Support for binary data via a
376 native clipboard format.
db0421f6 377
0b30bad4 3782001-03-22 Egor Duda <deo@logos-m.ru>
0cec3226 379
0b30bad4
CF
380 * fhandler_console.cc (fhandler_console::set_default_attr): Update
381 console color attributes on tty reset.
382
c4458148
CF
383Wed Mar 21 22:12:36 2001 Christopher Faylor <cgf@cygnus.com>
384
385 * autoload.cc (kernel32_init): New function for kernel32 autoload
386 initialization.
387 (SignalObjectAndWait): Add conditional load of this function when it is
388 available.
389
9a08b2c0
CF
3902001-03-21 Robert Collins <rbtcollins@hotmail.com>
391
392 * sched.cc: New file. Implement sched*.
393 * include/sched.h: New file. User land includes for sched*.
394 * Makefile.in: Add sched.o
395 * cygwin.din: Add exports for sched*.
396
a1299ba5
CF
397Tue Mar 20 14:48:46 2001 Christopher Faylor <cgf@cygnus.com>
398
399 * dtable.cc: Guard against new winsock.h/winsock2.h warnings when
400 mixing winsock*.h and sys/types.h.
401 * fhandler_socket.cc: Ditto.
402 * net.cc: Ditto.
403 * select.cc: Ditto.
404 * exceptions.cc: Remove unneeded define.
405
b8c8fa17
CF
406Mon Mar 19 17:43:29 2001 Christopher Faylor <cgf@cygnus.com>
407
408 * exceptions.cc (interruptible): Update debugging output.
409 (setup_handler): Ensure that wait_sig loop wakes up when we punt on
410 sending a signal.
411 * poll.cc (poll): Add signal guard here.
412
78ace8a7
ED
4132001-03-19 Egor Duda <deo@logos-m.ru>
414
415 * tty.h (tty::create_inuse): Add new parameter to allow non-
416 inheritable 'inuse' events.
417 * tty.cc (tty::create_inuse): Use new parameter.
418 * fhandler_tty.cc (fhandler_tty_master::init): Ditto.
419 * fhandler_tty.cc (fhandler_pty_master::open): Ditto.
420 * fhandler_tty.cc (fhandler_tty_master::init): Create master_alive
421 event.
422 * tty.cc (tty_list::terminate): Close master_alive event.
423 * fhandler_tty.cc (fhandler_tty_common::close): Send EOF to slaves
424 when master side is closed.
425
98750a84
CV
426Mon Mar 19 14:32:00 2001 Corinna Vinschen <corinna@vinschen.de>
427
428 * mmap.cc (map::get_list_by_fd): Avoid calling `get_namehash' when
429 file descriptor is -1.
430
30f326bf
CV
431Sat Mar 17 18:30:00 2001 Corinna Vinschen <corinna@vinschen.de>
432
433 * syscalls.cc (check_posix_perm): New static function.
434 (fpathconf): Add _PC_POSIX_PERMISSIONS and _PC_POSIX_SECURITY
435 support.
436 (pathconf): Ditto.
437 * include/cygwin/version.h: Bump API minor number to 37.
438
5e8e21d9
ED
4392001-03-18 Egor Duda <deo@logos-m.ru>
440
441 * fhandler.h (fhandler_tty_slave): Declare new methods.
442 * select.cc (fhandler_tty_slave::select_read): New method.
443 * select.cc (fhandler_tty_slave::ready_for_read): Ditto.
444 * select.cc (verify_tty_slave): New function.
445 * fhandler_termios.cc (fhandler_termios::line_edit): Empty input
446 buffer on signal.
447 * fhandler_tty.cc (fhandler_tty_slave::read): Check for input data
448 after reading from pipe. Reset event if input pipe is empty.
449 * tty.h (class tty): Allow creating events with manual reset.
450 * tty.cc (tty::get_event): Use manual_reset flag.
451 * tty.cc (tty::common_init): Create input_available_event with
452 manual reset.
453
00a74961
CF
454Sat Mar 17 21:48:03 2001 Christopher Faylor <cgf@cygnus.com>
455
456 * external.cc (fillout_pinfo): Match windows pid, as well as cygwin pid
457 when passed in pid. Don't prematurely break when searching for a pid.
458
459 * thread.h (_winsup_t): Eliminate unneeded field.
460
8eb72e63
CV
461Sat Mar 17 20:46:00 2001 Corinna Vinschen <corinna@vinschen.de>
462
463 * net.cc (get_95_ifconf): Use strcasematch instead of strcasecmp.
464 * syscalls.cc (_unlink): Ditto.
465 (_rename): Ditto.
466
57499703
CF
467Sat Mar 17 12:43:15 2001 Christopher Faylor <cgf@cygnus.com>
468
469 * path.cc (suffix_scan::next): Avoid searching for foo.lnk twice when
470 input is "foo".
471
298fad46
CV
472Sat Mar 17 18:10:00 2001 Corinna Vinschen <corinna@vinschen.de>
473
474 * net.cc (cygwin_socket): Set protocol to 0 when address family is
475 AF_UNIX to avoid WSAEPROTONOSUPPORT error.
476
f52488f7
CV
477Sat Mar 17 09:51:32 2001 Mathew Brozowski <brozow@tavve.com>
478
479 * net.cc (cygwin_socket): Pass protocol parameter to socket call.
480
b63a3f55
CF
481Sat Mar 17 02:05:38 2001 Christopher Faylor <cgf@cygnus.com>
482
483 * dir.cc (readdir): Use strcasematch for consistency.
484 * path.cc (symlink_info): Eliminate known_suffix.
485 (path_conv::check): Always copy ext_here to end of buffer, if found.
486 (suffix_scan): Eliminate ext_here, add suffixes_start.
487 (suffix_scan::has): Eliminate an argument. Reorganize. Always return
488 pointer to end of input path.
489 (suffix_scan::next): Take a second pass through the suffix list looking
490 for .lnk.
491 (symlink_info::check): Eliminate known_suffix usage.
492
db15b3e3 493Sat Mar 17 00:10:52 2001 Christopher Faylor <cgf@cygnus.com>
5bb22c6b 494
db15b3e3 495 * syscalls.cc (stat_dev): Give devices full read/write by default.
5bb22c6b 496
c0c9de3c
CF
497Saturday Mar 17 3:45 2001 Robert Collins <rbtcollins@hotmail.com>
498
499 * thread.cc (MTinterface::CreateCond): Check for null attr pointer.
500
ddca580f
CF
501Fri Mar 16 21:13:23 2001 Christopher Faylor <cgf@cygnus.com>
502
503 * fhandler_termios.cc (fhandler_termios::line_edit): Don't accept input
504 when a signal is sent or we'll end up in an EOF/signal race.
505
b65c6896
CF
506Fri Mar 16 20:25:40 2001 Christopher Faylor <cgf@cygnus.com>
507
508 * path.cc: Translate scan states from defines to enums.
509 (suffix_scan): Rename state to nextstate for clarity.
510 (lnk_match): Change to allow multiple states to indicate that a .lnk
511 has been matched.
512 (suffix_scan::has): Eliminate a goto. Handle .lnk as a special case,
513 since a .lnk may also need to be tacked on the end of a .lnk.
514 (suffix_scan::next): Don't increment next state. Set it specifically.
515 Recognize new .lnk states.
516
92f4bf97 517Saturday Mar 17 01:19 2001 Robert Collins rbtcollins@hotmail.com
0cec3226 518
5ccbf4b6
CF
519 * cygwin.din: Export the new functions.
520 * pthread.cc (pthread_cond_*): Add wrapper functions that call
521 __pthread_cond* functions.
522 * thread.cc (__pthread_cond_*): Implement the pthread_cond* functions.
523 * thread.h: Add new class entries and prototypes for __pthread_cond*
524 functions.
525 * include/pthread.h: user land header prototypes for pthread_cond*
526 functions and related defines.
527
e212576d
CV
528Wed Mar 14 16:30:00 2001 Corinna Vinschen <corinna@vinschen.de>
529
530 * environ.cc (parse_options): Use strtok_r instead of strtok.
531 * security.cc (convert_string_sid_to_sid): Ditto.
532 (aclfromtext): Ditto. Fix buffer usage.
533
78d2c08c
CV
534Wed Mar 14 10:11:00 2001 Corinna Vinschen <corinna@vinschen.de>
535
536 * path.cc (lnk_suffixes): Remove.
537 (class suffix_scan): Add `lnk_state' flag.
538 (suffix_scan::lnk_match): Return state of `lnk_state' now.
539 (suffix_scan::has): Changed behaviour if file has `.lnk' suffix.
540 (suffix_scan::next): Set `lnk_state' where appropriate.
541 (symlink_info::check): Fix a wrong `break'.
542 * syscalls.cc (chown_worker): Change debug statement to reflect
543 lchown fix.
544 (lchown): Call chown_worker with `PC_SYM_NOFOLLOW' instead of
545 `PC_SYM_IGNORE'.
546
1d39c83a
CV
547Tue Mar 13 13:52:00 2001 Corinna Vinschen <corinna@vinschen.de>
548
549 * fhandler.cc (fhandler_disk_file::fstat): Add correct modes to
550 symlinks when stat'ing on FAT or FAT32 file systems.
551
e935fcf0
ED
5522001-03-12 Egor Duda <deo@logos-m.ru>
553
554 * fhandler.h (fhandler_termios::fixup_after_exec): New function.
344ce60c
ED
555 * fhandler_termios.cc (fhandler_termios::fixup_after_fork): New
556 function. Fixup output handle.
e935fcf0
ED
557 * fhandler_tty.cc (fhandler_tty_common::fixup_after_fork): Output
558 handle is now fixed up in fhandler_termios::fixup_after_fork().
559
79409dc0
ED
5602001-03-12 Egor Duda <deo@logos-m.ru>
561
562 * fhandler.h (fhandler_termios::fhandler_termios): Enable fixup
563 after fork.
564 * fhandler_console.cc (fhandler_console::fhandler_console): Fixup
565 after fork is now enabled in the base class constructor.
566
2b777e2e
CF
567Mon Mar 12 11:19:41 2001 Christopher Faylor <cgf@cygnus.com>
568
569 * mkvers.sh: Include config.h so that DEBUGGING is correctly defined.
570
941fa5ad
CF
571Mon Mar 12 09:47:55 2001 Christopher Faylor <cgf@cygnus.com>
572
573 * spawn.cc (spawn_guts): Don't set EXIT_REPARENTING if parent process
574 is not a cygwin process (suggested by Jason Gouger
575 <cygwin@jason-gouger.com>).
576
d0909d91
CF
577Sun Mar 11 16:00:58 2001 Christopher Faylor <cgf@cygnus.com>
578
579 * child_info.h: Bump magic number for fork/exec/spawn.
580
2116a175
CF
581Sat Mar 10 20:54:47 2001 Christopher Faylor <cgf@cygnus.com>
582
583 * autoload.cc (noload): Use proper method for multiline strings or
584 newer gcc's complain.
585 * exceptions.cc (unused_sig_wrapper): Ditto.
586 * fhandler.h (fhandler_base): Make get_io_handle and friends return
587 self.
588 * fhandler_tty.cc (fhandler_pty_common::close_on_exec): Accomodate
589 DEBUGGING flag to avoid spurious warnings when inheritance is set.
590
7cf3b655
CF
591Sat Mar 10 16:52:12 2001 Christopher Faylor <cgf@cygnus.com>
592
593 * shortcut.c (PATH_ALL_EXEC): Add parentheses to avoid a compiler
594 warning.
595
596 * exceptions.cc (setup_handler): Clarify debugging message.
597 * sigproc.cc (proc_subproc): Remove PROC_CHILDSTOPPED test. It is
598 handled by normal PROC_CLEARWAIT case.
599 (wait_sig): Eliminate "dispatched" tracking. Remove __SIGCHILDSTOPPED
600 test. Decrement counter again before jumping out of
601 InterlockedDecrement loop so that subsequent InterlockedIncrement will
602 keep the counter at the correctly decremented value and also detect
603 when there are pending signals.
604 * sigproc.h: Remove __SIGCHILDSTOPPED element.
605 (procstuff): Remove PROC_CHILDSTOPPED element.
606
e2f2a27e
CF
607Sat Mar 10 15:22:44 2001 Christopher Faylor <cgf@cygnus.com>
608
609 * syscalls.cc (_rename): Set errno to ENOENT when an old path doesn't
610 exist (from Kazuhiro Fujieda <fujieda@jaist.ac.jp>). Also set EACCES
611 when directory is not writable.
612
6ebccdc1
CF
613Wed Mar 7 15:49:47 2001 Christopher Faylor <cgf@cygnus.com>
614
615 * syscalls.cc (_read): Change definition to return ssize_t to be
616 consistent with read.
617 (_write): Change definition to return ssize_t to be consistent with
618 write.
619
efd76e41
CF
620Wed Mar 7 01:08:21 2001 Christopher Faylor <cgf@cygnus.com>
621
622 * sigproc.h (sigthread): Declare new methods. Create new winapi_lock
623 field.
624 (sigframe:;set): Call get_winapi_lock after frame is set so that signal
625 handler thread knows not to call SuspendThread.
626 (sigframe::~sigframe): Release winapi_lock.
627 * exceptions.cc (sigthread::get_winapi_lock): New method.
628 (sigthread::release_winapi_lock): New method.
629 (setup_handler): Use get_winapi_lock to ensure that signalled thread is
630 not blocked in a Windows API.
631
632 * path.h (path_types): Avoid broken GCC warning.
633
bf11a54f
CV
634Tue Mar 6 14:02:00 2001 Corinna Vinschen <corinna@vinschen.de>
635
636 * path.cc (suffix_scan::has): Change order of conditionals
637 to allow checking for .lnk suffixes even if in_suffixes is empty.
638
639Tue Mar 6 13:02:00 2001 Corinna Vinschen <corinna@vinschen.de>
7cdc9fee
CV
640
641 * autoload.c (cygwin_premain0): Add missing parameter.
642 * binmode.c (cygwin_premain0): Ditto.
643 * textmode.c (cygwin_premain0): Ditto.
644
645Tue Mar 6 12:04:00 2001 Jason Tiller <jtiller@sjm.com>
646
647 * auto_load.cc: Add "GetKeyboardLayout" entry in the list of
648 Win32 User32.DLL exports to provide.
649 * fhandler.h (class fhandler_console): Add meta_mask private
650 member to remember which keystroke modifiers should generate
651 META.
652 * fhandler_console.cc (fhandler_console::read): Modify code that
653 tests a keystroke for a META-escaped key to use the 'meta_mask'
654 variable.
655 (fhandler_console::fhandler_console): Add definition for
656 variable "meta_mask" used to determine if a keystroke should be
657 preceded by META in the client console stream. Set meta_mask
658 based on whether or not user's keyboard language is English -
659 non-English keyboards pass AltGr (right <ALT>) unmolested,
660 whereas English keyboards now interpret left- and right-<ALT>
661 as META.
662
a887211b
CV
663Mon Mar 5 20:15:00 2001 Corinna Vinschen <corinna@vinschen.de>
664
665 * include/a.out.h: Add copyright hint.
666 * include/fcntl.h: Ditto.
667 * include/lastlog.h: Ditto.
668 * include/memory.h: Ditto.
669 * include/mntent.h: Ditto.
670 * include/paths.h: Ditto.
671 * include/poll.h: Ditto.
672 * include/syslog.h: Ditto.
673 * include/termio.h: Ditto.
674 * include/tzfile.h: Ditto.
675 * include/arpa/inet.h: Ditto.
676 * include/asm/byteorder.h: Ditto.
677 * include/asm/socket.h: Ditto.
678 * include/asm/types.h: Ditto.
679 * include/cygwin/if.h: Ditto.
680 * include/cygwin/mtio.h: Ditto.
681 * include/cygwin/rdevio.h: Ditto.
682 * include/cygwin/socket.h: Ditto.
683 * include/net/if.h: Ditto.
684 * include/netinet/in.h: Ditto.
685 * include/netinet/in_systm.h: Ditto.
686 * include/netinet/ip.h: Ditto.
687 * include/netinet/ip_icmp.h: Ditto.
688 * include/netinet/tcp.h: Ditto.
689 * include/sys/cdefs.h: Ditto.
690 * include/sys/cygwin.h: Ditto.
691 * include/sys/ioctl.h: Ditto.
692 * include/sys/mman.h: Ditto.
693 * include/sys/mount.h: Ditto.
694 * include/sys/mtio.h: Ditto.
695 * include/sys/procfs.h: Ditto.
696 * include/sys/resource.h: Ditto.
697 * include/sys/smallprint.h: Ditto.
698 * include/sys/socket.h: Ditto.
699 * include/sys/strace.h: Ditto.
700 * include/sys/syslog.h: Ditto.
701 * include/sys/sysmacros.h: Ditto.
702 * include/sys/termio.h: Ditto.
703 * include/sys/termios.h: Ditto.
704 * include/sys/uio.h: Ditto.
705 * include/sys/un.h: Ditto.
706 * include/sys/utsname.h: Ditto.
707 * include/sys/vfs.h: Ditto.
708 * include/sys/wait.h: Ditto.
709 * regexp/regerror.c: Ditto.
710 * regexp/regexp.h: Ditto.
711 * regexp/regmagic.h: Ditto.
712
95a8465b
CF
713Mon Mar 5 01:25:03 2001 Christopher Faylor <cgf@cygnus.com>
714
715 * dlopen.c (dlopen): Return NULL when name is NULL (suggested by
716 chrisiasci@aol.com).
717
718 * cygwin.din: Add a new, internally used export -
719 _check_for_executable.
720 * dcrt0.cc (dll_crt0_1): Set _check_for_executable for older binaries.
721 Pass user_data to premain functions.
722 * fhandler.cc (fhandler_disk_file::open): Only check for executable if
723 the linked program is intereested in the executable bit.
724 (fhandler_disk_file::check_execable_p): Delete.
725 * fhandler.h (executable_states): New enumeration of various states of
726 executable bit caring.
727 (fhandler_base::set_execable_p): New method.
728
729 * fhandler_termios.cc (fhandler_termios::line_edit): Flag when a signal
730 has been sent to the tty. Return -1 when this is so.
731 * fhandler_console.cc (fhandler_console::read): Return -1 when signal
732 sending character encountered.
733
734 * path.cc (path_conv::check): Record when path refers to a disk device.
735 Move executable extension check here.
736 (check_sysfile): Accomodate new EXEC path states.
737 (has_suffix): Remove.
738 (next_suffix): Remove.
739 (class suffix_scan): New clas.
740 (suffix_scan::has): New method.
741 (suffix_scan:next): New method.
742 (symlink_info::check): Use suffix_scan method to control for scanning
743 for suffixes.
744 * path.h (path_conv::exec_state): New method.
745 * perprocess.h: Make "C" friendly.
746 * include/cygwin/version.h: Define CYGWIN_VERSION_CHECK_FOR_S_IEXEC.
747 Bump CYGWIN_VERSION_API_MINOR.
748 * include/sys/cygwin.h: Change premain declarations.
749
750 * winsup.h: Move __cplusplus test to after builtin defines.
751
306c4b67
ED
7522001-03-04 Egor Duda <deo@logos-m.ru>
753
754 * fhandler.h (class fhandler_tty_common): New mutex and event to
755 syncronize input on master tty with slave tty.
756 * fhandler_tty.cc (fhandler_pty_master::accept_input): Use them to
757 syncronize with slave.
758 * fhandler_tty.cc (fhandler_tty_slave::read): Use input mutex and
759 event to syncronize with master. Do not limit amount of data read
760 from master to vmin value. Interrupt on signal and return already
761 read data, if any.
762 * fhandler_tty.cc (fhandler_tty_slave::open): Handle input mutex and
763 event.
764 * fhandler_tty.cc (fhandler_tty_common::close): Ditto.
765 * fhandler_tty.cc (fhandler_tty_common::set_close_on_exec): Ditto.
766 * fhandler_tty.cc (fhandler_tty_common::fixup_after_fork): Ditto.
767 * fhandler_tty.cc (fhandler_tty_common::dup): Ditto.
768 * tty.h (tty::open_input_mutex): New function.
769 * tty.cc (tty::common_init): Create input mutex and event.
770
ed94def2
CV
771Fri Mar 2 13:32:00 2001 Corinna Vinschen <corinna@vinschen.de>
772
773 * dir.cc (readdir): Fix creating path in symlink check.
774
e03f5f73
CV
775Fri Mar 2 12:33:00 2001 Corinna Vinschen <corinna@vinschen.de>
776
777 * dir.cc (readdir): Fix shortcut==symlink condition.
778 * environ.cc: Add extern decl for `allow_winsymlinks'.
779 (struct parse_thing): Add entry for `[no]winsymlinks'.
780 * path.cc (symlink): Change to be able to create both,
781 symlink==shortcut and symlink==systemfile, dependent of
782 the setting of `allow_winsymlinks'.
783 * security.cc (cygwin_logon_user): Add debug output.
784 * shortcut.c: Add defines from path.h.
785 (has_exec_chars): Copy from path.h.
786 (check_shortcut): Check for executable file condition if not a
787 shortcut.
788
903c330d
CF
789Thu Mar 1 21:06:07 2001 Christopher Faylor <cgf@cygnus.com>
790
791 * exceptions.cc (sig_handle_tty_stop): Ignore attempts to suspend a
792 process if started by non-cygwin parent.
793
d80999a1
CF
794Thu Mar 1 20:48:11 2001 Christopher Faylor <cgf@cygnus.com>
795
796 * select.cc (peek_console): Don't report read_ready on mouse events
797 unless we are looking for mouse events.
798 * fhandler.h (fhandler_console::mouse_aware): New method.
799
2de76014
CV
800Wed Feb 28 15:10:00 2001 Corinna Vinschen <corinna@vinschen.de>
801
802 * uinfo.cc: Eliminate `#include <wchar.h>'.
803
739db26a
ED
8042001-02-28 Egor Duda <deo@logos-m.ru>
805
806 * fhandler_floppy.cc (fhandler_dev_floppy::lseek): Determine
807 drive geometry or partition size to allow seeking from the end of
808 raw floppy device. Don't allow positioning past the end of media or
809 to offsets bigger then max off_t.
810
a53136cc
ED
8112001-02-27 Egor Duda <deo@logos-m.ru>
812
813 * fhandler.h (class fhandler_console): Make all variables that
814 describe "state" of console to be members of fhandler_console.
815 default_color is now the color which is set when console recieves
816 reset command.
817 * fhandler_console.cc (fhandler_console::fhandler_console): Turn
818 mouse handling and raw keyboard mode off by default. Initialize
819 state information.
820 * fhandler.cc (fhandler_console::set_raw_win32_keyboard_mode): New
821 function.
822 * fhandler_console.cc (fhandler_console::set_default_attr): New
823 function. Reset console attributes to default values.
824 * fhandler_console.cc (fhandler_console::open): Reset attributes.
825 * fhandler_console.cc (fhandler_console::get_win32_attr): New function.
826 Calculate win32-style console attribute based on terminal attributes.
827 * fhandler_console.cc (fhandler_console::set_cursor_maybe): Use
828 member variable.
829 * fhandler_console.cc (fhandler_console::read): If in raw-win32
830 keyboard mode, encode win32 keyboard events in \033{x;y;z;t;u;wK
831 sequences.
832 * fhandler_console.cc (fhandler_console::dup): Copy all state
833 information to the dup()ed handle.
834 * fhandler_console.cc (fhandler_console::scroll_screen): Use current
835 fill-in attribute.
836 * fhandler_console.cc (fhandler_console::clear_screen): Ditto.
837 * fhandler_console.cc (fhandler_console::char_command): Check if we
838 saw '?' symbol by member variable. Set terminal attributes on \033[Xm
839 commands. \033[24m - turn off underline mode, \033[27m - turn off
840 reverse mode, \033[39m - restore default foreground color.
841 \033[49m - restore default background color. \033[2000h - turn on raw
842 keyboard mode, \033[2000l - turn off raw keyboard mode.
843 * fhandler_console.cc (fhandler_console::write): Set attribues to
844 default values on reset command.
845
5b331f1e 8462001-02-26 Mike Simons <msimons@moria.simons-clan.com>
efd76e41 847
5b331f1e
CF
848 * times.cc (settimeofday): Replace function stub with working code.
849
88429768
CV
850Mon Feb 26 10:42:00 2001 Corinna Vinschen <corinna@vinschen.de>
851
852 * strace.cc (strace::vprntf): Move prntf functionality to this function
853 adding an va_list interface to strace.
854 (strace::printf): Calls strace::vprntf now.
855 (strace_printf): New function providing an extern "C" interface to
856 trace output.
857 * include/sys/strace.h: Make plain C clean.
858 (class strace): Add `vprntf' method.
859
6626ebfe
CV
860Mon Feb 26 0:10:00 2001 Corinna Vinschen <corinna@vinschen.de>
861
862 * shortcut.c: Remove #include <sys/strace.h>.
863
649033a8
CV
864Sun Feb 25 10:32:00 2001 Corinna Vinschen <corinna@vinschen.de>
865
866 * path.cc (symlink): Add a ".lnk" suffix regardless. Add a comment.
867
80ed95f2
CV
868Sun Feb 25 10:18:00 2001 Corinna Vinschen <corinna@vinschen.de>
869
649033a8 870 * shortcut.c (check_shortcut): Change symlink condition.
80ed95f2 871
675412e9
CV
872Fri Feb 23 10:42:00 2001 Corinna Vinschen <corinna@vinschen.de>
873
874 * mmap.cc (fhandler_disk_file::mmap): Use `addr' correctly.
875 * fhandler_mem.cc (fhandler_dev_mem::mmap): Ditto.
876
ff413a98
CV
877Thu Feb 22 17:09:00 2001 Corinna Vinschen <corinna@vinschen.de>
878
879 * path.cc (symlink): Keep relative paths relative in the DOS
659b480b
CV
880 path inside of a shortcut. If that's impossible or the target
881 path is already absolute save an absolute path.
ff413a98 882
c5a4eacc
CV
883Thu Feb 22 15:33:00 2001 Corinna Vinschen <corinna@vinschen.de>
884
885 * cygerrno.h: Revert previous patch.
886 * errno.cc: Ditto.
887 * dir.cc: Eliminate `dir_suffixes'.
888 (opendir): Remove usage of `dir_suffixes'.
889 (rmdir): Ditto.
890 * fhandler.cc (fhandler_disk_file::open): Remove usage of
891 `inner_suffixes'.
892 * path.cc: Rename `inner_suffixes' to `lnk_suffixes'.
893 (path_conv::check): Remove usage of `inner_suffixes'.
894 (symlink): Ditto.
895 (symlink_info::check): Handle checking for `.lnk' in path_conv
896 exclusively here.
897 (chdir): Remove usage of `dir_suffixes'.
898 * shortcut.c: Eliminate debug_printf lines.
899 (check_shortcut): Don't set error except on failing ReadFile.
900 * spawn.cc: Remove ".lnk" from `std_suffixes'.
901 * syscalls.cc (_unlink): Remove usage of `inner_suffixes'.
902 Remove ".lnk" from `stat_suffixes'.
903 (_rename): Add check for renaming a symlink to keep the ".lnk"
904 suffix after renaming.
905
79e56091
CV
906Thu Feb 22 13:38:00 2001 Corinna Vinschen <corinna@vinschen.de>
907
908 * shortcut.c: New file. Provides a C interface to reading of
909 Windows shortcuts to avoid compiler flag `-fvtable-thunks'.
910 * shortcut.h: Ditto.
911 * Makefile.in: Add shortcut.o to DLL_OFILES.
912 * cygerrno.h: Provide a C interface to `geterrno_from_win_error' for
913 using in shortcut.c.
914 * errno.cc (geterrno_from_win_error): Define as extern "C".
915 * path.cc (struct symlink_info): Remove methods `check_shortcut' and
916 `check_sysfile'.
917 (shortcut_header): Move to shortcut.c.
918 (shortcut_initalized): Ditto.
919 (create_shortcut_header): Ditto.
920 (cmp_shortcut_header): Ditto.
921 (symlink_info::check_shortcut): Ditto. Reorganize as a plain C function.
922 (symlink_info::check_sysfile): Redefine as a global function using the
923 same parameter list as `check_shortcut' for clearness.
924 (symlink_info::check): Change parameter list for calls to
925 `check_shortcut' and `check_sysfile'.
926
87e6b098
CV
927Thu Feb 22 12:04:00 2001 Corinna Vinschen <corinna@vinschen.de>
928
929 * fhandler.cc (fhandler_disk_file::open): Use `inner_suffixes' when
930 resolving real_path.
931 * path.cc (symlink): Ditto for win32_topath.
932
10b06c5e
CV
933Wed Feb 21 22:41:00 2001 Corinna Vinschen <corinna@vinschen.de>
934
935 * Makefile.in: Add `-lshell32 -luuid' to link pass for new-cygwin1.dll.
936 * autoload.cc: Add LoadDLLinitfunc for ole32.dll.
937 Add LoadDLLfuncEx statements for CoInitialize@4, CoUninitialize@0
938 and CoCreateInstance@20.
939 * dir.cc (dir_suffixes): New datastructure.
940 (readdir): Check for R/O *.lnk files to hide the suffix.
941 (opendir): Use `dir_suffixes' in path conversion.
942 (rmdir): Ditto.
943 * fhandler.cc (fhandler_disk_file::fstat): Add S_IFLNK flag
944 before calling `get_file_attribute'. Take FILE_ATTRIBUTE_READONLY
945 into account only if the file is no symlink.
946 * path.cc (inner_suffixes): New datastructure.
947 (SYMLINKATTR): Eliminated.
948 (path_conv::check): Use `inner_suffixes' on inner path components.
949 (shortcut_header): New global static variable.
950 (shortcut_initalized): Ditto.
951 (create_shortcut_header): New function.
952 (cmp_shortcut_header): Ditto.
953 (symlink): Create symlinks by creating windows shortcuts. Preserve
954 the old code.
955 (symlink_info::check_shortcut): New method.
956 (symlink_info::check_sysfile): Ditto.
957 (symlink_info::check): Check for shortcuts. Move code reading
958 old system attribute symlinks into symlink_info::check_sysfile().
959 (chdir): Use `dir_suffixes' in path conversion.
960 * security.cc (get_file_attribute): Check for S_IFLNK flag.
961 Force 0777 permissions then.
962 * spawn.cc (std_suffixes): Add ".lnk" suffix.
963 * syscalls.cc (_unlink): Use `inner_suffixes' in path conversion.
964 Check for shortcut symlinks to eliminate R/O attribute before
965 calling DeleteFile().
966 (stat_suffixes): Add ".lnk" suffix.
967 (stat_worker): Force 0777 permissions if file is a symlink.
968
0917ed59
ED
9692001-02-21 Egor Duda <deo@logos-m.ru>
970
971 * sigproc.cc (getsem): Make semaphore always non-inheritable.
972
441d7aee
CF
973Mon Feb 19 22:25:53 2001 Christopher Faylor <cgf@cygnus.com>
974
975 * dcrt0.cc (locale_init): Remove.
976
f97e7d75
CF
9772001-02-15 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
978
979 * cygwin.din: Export rand48 functions.
980 * thread.cc (MTinterface::Init): Remove the initialization of
981 `reent_data'.
982 * dcrt0.cc: Add the initalizer to the declaration of `reent_data'.
983 * include/cygwin/version.h: Bump CYGWIN_VERSION_API_MINOR to 35.
984
fc68bf34
ED
9852001-02-16 Egor Duda <deo@logos-m.ru>
986
987 * signal.cc (signal): Prohibit setting handlers for SIGKILL and
988 SIGSTOP
989 * signal.cc (sigaction): Ditto
990 * syscalls.cc (_lseek): Return EINVAL on invalid input
991
ee2c7251
CF
992Wed Feb 14 14:54:40 2001 Christophe Iasci <chrisiasci@aol.com>
993
994 * dlfcn.cc (dlopen): Do not call LoadLibrary with a NULL pointer, when
995 the library is not found
996
8f8e7442 9972001-02-14 Egor Duda <deo@logos-m.ru>
efd76e41 998
8f8e7442
CF
999 * fhandler_console.cc (fhandler_console::char_command): Ignore unknown
1000 rendition codes in \033[xx;yym control sequences
1001
cde0c2fb
CF
1002Fri Feb 9 23:19:01 2001 Christopher Faylor <cgf@cygnus.com>
1003
1004 * fork.cc (fork_parent): Return EAGAIN when can't record pid.
1005 * pinfo.h (pinfo::remember): Return value of call to proc_subproc.
1006 * sigproc.cc (proc_subproc): Return error if can't record pid.
1007
c41482c7
CF
1008Fri Feb 9 12:17:27 2001 Christopher Faylor <cgf@cygnus.com>
1009
1010 * syscalls.cc (mknod): Add valid parameters.
1011
889109ab
CV
1012Thu Feb 8 22:09:00 2001 Corinna Vinschen <corinna@vinschen.de>
1013
1014 * mmap.cc (mmap): Check for reusing a mapping only on MAP_SHARED
1015 and on MAP_PRIVATE|MAP_ANON in the special case of offset 0.
1016
db49d0b5
CV
1017Thu Feb 8 21:57:00 2001 Corinna Vinschen <corinna@vinschen.de>
1018
1019 * mmap.cc (class list): Add member `hash'.
1020 (list::list): Initialize `hash'.
1021 (list::get_list_by_fd): Use filepath hash value to get the correct
1022 mapping list if it's not an anonymous mapping.
1023 (map::add_list): Initialize `hash' with filepath hash value.
1024 (mmap): Check for reusing a mapping only on MAP_SHARED.
1025
91d385fe
CF
1026Wed Feb 7 18:47:36 2001 Christopher Faylor <cgf@cygnus.com>
1027
1028 * signal.cc (killpg): Correct first argument.
1029
9182099c
CV
1030Wed Feb 7 22:22:00 2001 Corinna Vinschen <corinna@vinschen.de>
1031
1032 * autoload.cc: Add LoadDLLinitfunc for iphlpapi.dll.
1033 Add LoadDLLfuncEx statements for GetIfTable@12 and GetIpAddrTable@12.
1034 * fhandler_socket.cc (fhandler_socket::ioctl): Move variable
1035 definitions to the beginning of the function to allow better debugging.
1036 Add handling for SIOCGIFHWADDR, SIOCGIFMETRIC and SIOCGIFMTU.
1037 * net.cc: Include iphlpapi.h.
1038 (get_2k_ifconf): Rewritten. Uses IP Helper API now.
1039 (get_nt_ifconf): Add handling for SIOCGIFHWADDR, SIOCGIFMETRIC
1040 and SIOCGIFMTU.
1041 (get_95_ifconf): Ditto. Renamed from `get_9x_ifconf'.
1042 (get_ifconf): Name loopback `lo' instead of `lo0' as in Linux.
1043 Add handling for SIOCGIFHWADDR, SIOCGIFMETRIC and SIOCGIFMTU.
1044 Call `get_95_ifconf' only on Windows 95, `get_nt_ifconf' only
1045 on Windows NT < Service Pack 3, `get_2k_ifconf otherwise.
1046 * include/asm/socket.h: Add defines for SIOCGIFHWADDR, SIOCGIFMETRIC
1047 and SIOCGIFMTU.
1048 * include/cygwin/if.h: Add `ifr_hwaddr', `ifr_metric' and `ifr_mtu'.
1049 (struct ifreq): Add `ifru_hwaddr'.
1050
d7ed877b
CV
1051Tue Feb 6 15:04:00 2001 Corinna Vinschen <corinna@vinschen.de>
1052
1053 * syscalls.cc (stat_worker): Add a check for the special case when
1054 a process creates a file using mode 000 using ntsec.
1055
ae9b22c6
CV
1056Mon Feb 5 17:00:00 2001 Corinna Vinschen <corinna@vinschen.de>
1057
1058 * fhandler.cc (fhandler_base::open): Always add GENERIC_READ access
1059 when opening raw disk devices.
1060 * fhandler_floppy.cc (fhandler_dev_floppy::lseek): Implement bytewise
1061 access.
1062 * fhandler_raw.cc (fhandler_dev_raw::open): Always open raw disk device
1063 binary.
1064 (fhandler_dev_raw::raw_write): Don't drop read buffer content when
1065 writing after read.
1066
cada03f9
CV
1067Mon Feb 5 13:30:00 2001 Corinna Vinschen <corinna@vinschen.de>
1068
1069 * mmap.cc (mmap_record::fixup_map): New method to duplicate
1070 the memory protection in a just forked child.
1071 (mmap): Realign gran_len to page boundary only on anonymous
1072 mapping before saving in the mmap_record.
1073 (munmap): Cleanup code.
1074 (msync): Ditto.
1075 (fixup_mmaps_after_fork): Ditto. Call mmap_record::fixup_map now.
1076
47f81092
CF
1077Thu Feb 1 23:08:29 2001 Christopher Faylor <cgf@cygnus.com>
1078
1079 * cygheap.cc (creturn): Correctly calculate cygheap_max.
1080
f8da1507
CF
1081Wed Jan 31 10:04:58 2001 Christopher Faylor <cgf@cygnus.com>
1082
1083 * shared.cc (shared_info::initialize): Reduce size of heap.
1084
83443511
CV
1085Wed Jan 31 13:22:00 2001 Corinna Vinschen <corinna@vinschen.de>
1086
1087 * include/sys/resource.h: Fix typo.
1088
44e6d951
CV
1089Wed Jan 31 13:20:00 2001 Corinna Vinschen <corinna@vinschen.de>
1090
83443511 1091 * include/sys/resource.h: Add RLIMIT_NLIMITS and RLIM_NLIMITS.
44e6d951 1092
4f42df7b
CF
1093Tue Jan 30 18:15:23 2001 Christopher Faylor <cgf@cygnus.com>
1094
1095 * include/cygwin/version.h: Bump version to 1.3.0.
1096
9928a7e1
CV
1097Tue Jan 30 8:55:00 2001 Corinna Vinschen <corinna@vinschen.de>
1098
1099 * pinfo.cc (pinfo::init): Use INVALID_HANDLE_VALUE instead of
1100 explicit cast (HANDLE) 0xffffffff.
1101 * shared.cc (open_shared): Ditto.
1102
747e88d3
CF
1103Mon Jan 29 17:15:22 2001 Bill Hegardt <bill@troyxcd.com>
1104
1105 * fhandler_serial.cc (raw_write): Use local copy of OVERLAPPED
1106 structure instead of shared structure to fix a race condition between
1107 read/write.
1108
68ea0dc2
CV
1109Mon Jan 29 14:30:00 2001 Corinna Vinschen <corinna@vinschen.de>
1110
1111 * mmap.cc (mmap): Remove obsolete check for MAP_SHARED|MAP_ANON as
1112 being invalid.
1113
f977222f
CV
1114Mon Jan 29 10:23:00 2001 Corinna Vinschen <corinna@vinschen.de>
1115
1116 * mmap.cc (mmap_record::find_empty): Fix loop condition.
1117
6a4878cf
CF
1118Sun Jan 28 19:40:40 2001 Christopher Faylor <cgf@cygnus.com>
1119
1120 * syscalls.cc (_link): Make sure that newpath does not exist. Set
1121 errno if it does.
1122
1123Sun Jan 28 19:29:08 2001 Christopher Faylor <cgf@cygnus.com>
1124
1125 * cygheap.cc (init_cheap): Don't specify a load address for the heap.
1126 It doesn't work on #!*& Windows 9x.
1127 (cygheap_init): Move GetUserName to memory_init.
1128 * dcrt0.cc (dll_crt0_1): Call new memory_init functin, eliminate call
1129 to heap_init.
1130 * heap.cc (heap_init): Improve error output.
1131 * heap.h: Correct some declarations.
1132 * shared.cc (mount_table_init): Remove.
1133 (memory_init): Renamed from shared_init. Reorganize to accomodate
1134 strange Windows 9x problems with cygheap/heap interaction.
1135 * shared_info.h: Rename shared_init to memory_init.
1136
ae6c8e4f
CF
1137Sun Jan 28 01:25:33 2001 Christopher Faylor <cgf@cygnus.com>
1138
1139 * include/cygwin/version.h: Bump API version.
1140
9a089f21
CF
1141Sun Jan 28 01:18:22 2001 Christopher Faylor <cgf@cygnus.com>
1142
1143 * cygheap.cc (init_cheap): Move username initialization.
1144 (cygheap_init): Here.
1145 * shared_info.h (mount_info): Add a sys_mount_table_counter field.
1146 (shared_info): Ditto.
1147 * path.cc (mount_info::conv_to_win32_path): Check that our mount table
1148 is in sync with the system mount table and reinitialize it if not.
1149 (mount_info::add_reg_mount): Bump sys_mount_table counters if the
1150 system mount table changes.
1151 (mount_info::del_reg_mount): Ditto.
1152 (mount_info::write_cygdrive_info_to_registry): Ditto.
1153 (mount_info::remove_cygdrive_info_from_registry): Ditto.
1154
2a6fc028
CF
1155Sun Jan 28 00:28:30 2001 Christopher Faylor <cgf@cygnus.com>
1156
1157 Throughout, change 'cygwin_shared.mount' to 'mount_table'.
1158 * child_info.h (child_info): Move shared_h, console_h to cygheap. Add
1159 mount_h.
1160 * cygheap.h (init_cygheap): Add shared_h, console_h.
1161 * cygheap.cc (init_cheap): Initialize heap at a fixed location after
1162 the shared memory regions. Initialize cygheap->user name here.
1163 * dcrt0.cc (dll_crt0_1): Call getpagesize () to initialize constants.
1164 Remove cygheap_init since it is done in shared_init now.
1165 (_dll_crt0): Initialize mount_h, remove shared_h and console_h
1166 initialization.
1167 * fhandler_console.cc (console_shared_h): Eliminate.
1168 (get_tty_stuff): Use cygheap->console_h rather than console_shared_h.
6a4878cf
CF
1169 * heap.cc (heap_init): Use page size constant calculated earlier in
1170 initialization.
2a6fc028
CF
1171 * shared.cc: Eliminate cygwin_shared_h. Add cygwin_mount_h.
1172 (mount_table_init): New function for initializing a user mount table.
6a4878cf
CF
1173 (open_shared_file_map): Use constant for shared memory region.
1174 Initialize cygheap and mount table here.
2a6fc028
CF
1175 (open_shared): Improve debugging output.
1176 (shared_info::initialize): Eliminate call to mount.init.
1177 (shared_terminate): Use cygheap->shared_h. Close cygwin_mount_h.
1178 (open_shared_file_map): Eliminate.
1179 * shared_info.h (mount_info): Add a version field.
6a4878cf
CF
1180 (shared_align_past): New macro for calculating location for shared
1181 memory regions.
2a6fc028 1182 * sigproc.cc (init_child_info): Eliminate shared_h, console_h.
6a4878cf
CF
1183 * spawn.cc (spawn_guts): Pass on cygwin_mount_h iff not a different
1184 user.
2a6fc028
CF
1185 * syscalls.cc (system_info): New global holding system memory defaults.
1186 (getpagesize): Use system_info.
1187 * uinfo.cc (internal_getlogin): Only fill in user name if nonexistent.
1188 * winsup.h: Declare system_info.
1189
6a4878cf
CF
1190 * passwd.cc (read_etc_passwd): Use cygheap->user.name () rather than
1191 retrieving the name again.
2a6fc028 1192
bdfeca60
CF
1193Sat Jan 27 10:18:02 2001 Christopher Faylor <cgf@cygnus.com>
1194
1195 * path.cc (path_conv::check): Detect when path has symlinks.
1196 (symlink_info::check): Remove debugging stuff.
1197 (chdir): Use posix'ized win32 path if cd'ed to a path using symlinks.
1198
206a8d88
CF
1199Fri Jan 26 21:20:28 2001 Christopher Faylor <cgf@cygnus.com>
1200
1201 * exceptions.cc (sigreturn): Call any pending signals prior to
1202 resetting the signal mask so that stacked signals behave correctly.
1203 (sigdelayed): Avoid a race where a signal could end up calling an
1204 incorrect signal handler if two signals come in close together.
1205
174f1a39
CV
1206Tue Jan 23 21:56:00 2001 Corinna Vinschen <corinna@vinschen.de>
1207
1208 * mmap.cc (fhandler_disk_file::mmap): Call CreateFileMapping with
1209 len != 0 only when performing an anonymous mapping.
1210
4c7b8250
CF
1211Mon Jan 22 15:35:28 2001 Christopher Faylor <cgf@cygnus.com>
1212
1213 * path.h: Add a new constant.
1214 * syscalls.cc (_read): Oscillate errno check.
1215
c65a3183
CF
1216Mon Jan 22 15:27:12 2001 Christopher Faylor <cgf@cygnus.com>
1217
1218 * include/cygwin/version.h: Bump API to reflect setlogmask.
1219
29c39fe3
CF
1220Sun Jan 21 22:40:25 2001 Jason Tishler <jt@dothill.com>
1221
1222 * cygwin.din: Add export for setlogmask().
1223 * syslog.cc (setlogmask): New function.
1224
c807d355
CV
1225Thu Jan 18 10:27:00 2001 Corinna Vinschen <corinna@vinschen.de>
1226
1227 * resource.cc (setrlimit): Support RLIMIT_NOFILE.
1228
4e2a97b2
CF
1229Wed Jan 17 23:23:12 2001 Christopher Faylor <cgf@cygnus.com>
1230
1231 * syscalls.cc (setdtablesize): Call with amount to increment not total
1232 amount. Return success or failure error code.
1233
a7cde2b9
CF
1234Wed Jan 17 09:47:13 2001 Christopher Faylor <cgf@cygnus.com>
1235
1236 * autoload.cc (LoadDLLinitfunc): Remove debugging statement.
1237
1238 * exceptions.cc (sig_handle_tty_stop): Move setting of PID_STOPPED to
1239 earlier in interrupt.
1240 ((interrupt_setup): i.e., here.
1241 (sig_handle): Don't queue multiple SIGSTOPS.
1242 * fhandler.h (bg_check_types): Enumerate return value of bg_check for
1243 clarity.
1244 * signal.cc (kill_pgrp): Minor cleanup.
1245 * fhandler_termios.cc (fhandler_termios::bg_check): Use enumerated type
1246 for function return. Don't raise signal if a signal is already queued.
1247 * fhandler_console.cc (fhandler_console::read): Use enumerated return
1248 type for bg_check.
1249 * select.cc: Ditto, throughout.
1250 * read.cc: Ditto, throughout.
1251 * termios.cc: Ditto, throughout.
1252 (_read): YA interrupt detect simplification.
1253 * wait.cc (wait4): Ditto.
1254
cb503978
CV
1255Wed Jan 17 10:56:00 2001 Corinna Vinschen <corinna@vinschen.de>
1256
1257 * cygheap.cc (cygheap_user::~cygheap_user): Temporarily
1258 disable free'ing memory.
1259
9fedfd57
CV
1260Tue Jan 16 18:01:00 2001 Corinna Vinschen <corinna@vinschen.de>
1261
1262 * mmap.cc (mmap): Initialize fh to avoid compiler warnings.
1263
9470a80c
CF
1264Mon Jan 15 21:07:00 2001 Christopher Faylor <cgf@cygnus.com>
1265
1266 * wait.cc (wait4): Rename variable for consistency. Allow restartable
1267 signal behavior.
1268
9334c89c
CV
1269Mon Jan 15 23:15:00 2001 Corinna Vinschen <corinna@vinschen.de>
1270
1271 * mmap.cc (mmap): Add more parameter checking. Change error output
1272 in case of EINVAL. Treat mmapping /dev/zero like MAP_ANONYMOUS.
1273
c6dd43f2
CV
1274Mon Jan 15 20:34:00 2001 Corinna Vinschen <corinna@vinschen.de>
1275
1276 * mmap.cc: include <unistd.h>. Define some bit operations for
1277 the new page map.
1278 (mmap_record): Change type of base_address_ to caddr_t.
1279 Add map_map_ member. Add several methods to manipulate map_map_.
1280 (mmap_record::alloc_map): New method.
1281 (mmap_record::free_map): Ditto.
1282 (mmap_record::find_empty): Ditto.
1283 (mmap_record::map_map): Ditto.
1284 (mmap_record::unmap_map): Ditto.
1285 (list::add_record): Change return type to `mmap_record *'.
1286 Allocate page map.
1287 (list::match): New method.
1288 (mmap): Partly rewritten to take care for the new page map. Add some
1289 parameter checking.
1290 (munmap): Ditto.
1291
66097f06
CV
1292Mon Jan 15 13:50:00 2001 Corinna Vinschen <corinna@vinschen.de>
1293
1294 * heap.cc (heap_init): Fix extern declaration of getpagesize.
1295 * syscalls.cc (getpagesize): Fix another typo.
1296
dc3651b6
CV
1297Mon Jan 15 12:48:00 2001 Corinna Vinschen <corinna@vinschen.de>
1298
1299 * syscalls.cc (getpagesize): Save pagesize in global variable to
1300 avoid calling GetSystemInfo too often.
1301 * heap.cc (getpagesize): Eliminate.
1302 (heap_init): Use getpagesize function from syscalls.cc.
1303
4cf2c0e0
CV
1304Mon Jan 15 11:56:00 2001 Corinna Vinschen <corinna@vinschen.de>
1305
1306 * sysconf.cc (sysconf): return `getpagesize ()' on _SC_PAGESIZE
1307 request to avoid implementing the same twice.
1308
a3ec080b
CF
1309Sun Jan 14 14:07:50 2001 Christopher Faylor <cgf@cygnus.com>
1310
1311 * syscalls.cc (_read): Use more lightweight method for determining if
1312 read has been interrupted by a signal.
1313
c3d62298
CF
1314Fri Jan 12 00:35:15 2001 Christopher Faylor <cgf@cygnus.com>
1315
1316 * debug.h: Add regparm attributes to some functions.
1317
1318 * signal.cc (sigaction): Don't treat SIGCONT specially.
1319
6a4878cf
CF
1320 * exceptions.cc (interrupt_setup): Save sa_flags of interrupted signal
1321 for later use.
c3d62298
CF
1322 (sig_handler): Default any stopping signal to SIGSTOP.
1323 (call_signal_handler): New function.
1324 (sigdelayed0): New function.
6a4878cf
CF
1325 * sigproc.cc (sigproc_init): Initialize SIGSTOP sigaction for special
1326 behavior.
c3d62298
CF
1327 * sigproc.h: Define call_signal_handler.
1328 * syscalls.cc (_read): Allow restartable signal behavior.
1329
c4efddf6
CV
1330Thu Jan 11 13:17:00 2001 Corinna Vinschen <corinna@vinschen.de>
1331
1332 * fhandler.h (fhandler_base): New method `fixup_mmap_after_fork'.
1333 (fhandler_disk_file: Ditto.
1334 (fhandler_dev_mem): Ditto.
1335 * fhandler_mem.cc (fhandler_dev_mem::open): Set OBJ_INHERIT attribute
1336 for device\physicalmemory handle.
1337 (fhandler_dev_mem::mmap): Ditto.
6a4878cf
CF
1338 * fhandler_mem.cc (fhandler_dev_mem::fixup_mmap_after_fork): New
1339 method.
1340 * mmap.cc (mmap_record): Add private `fdesc_' member. Change
1341 constructor accordingly.
c4efddf6
CV
1342 (get_fd): New method.
1343 (mmap): Use new mmap_record constructor.
1344 (fhandler_base::fixup_mmap_after_fork): New method.
1345 (fhandler_disk_file::fixup_mmap_after_fork): Ditto.
6a4878cf 1346 (fixup_mmaps_after_fork): Call `fixup_mmap_after_fork' of appropriate
c4efddf6
CV
1347 fhandler class.
1348
7416e1d2
CF
1349Wed Jan 10 22:08:30 2001 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
1350
1351 * sigproc.cc (wait_sig): Allow SIGCONT when stopped.
1352
55ae1dff
CV
1353Tue Jan 9 16:55:00 2001 Corinna Vinschen <corinna@vinschen.de>
1354
1355