1 Fri Apr 20 22:25:00 2001 Corinna Vinschen <corinna@vinschen.de>
3 * security.cc (set_process_privileges): Swap out.
4 * sec_helper.cc (set_process_privilege): Rename from
5 `set_process_privileges'. Takes the privilege to enable or disable
7 * security.h: Add prototype for `set_process_privileges'.
9 2001-04-19 Egor Duda <deo@logos-m.ru>
11 * path.cc (path_conv::check): Always initialize member variables.
13 Fri Apr 20 12:27:49 2001 Christopher Faylor <cgf@cygnus.com>
15 * include/sys/file.h: More cleanup for X_OK.
17 Fri Apr 20 11:48:45 2001 Christopher Faylor <cgf@cygnus.com>
19 * include/sys/file.h: Move X_OK protection earlier.
21 * dtable.cc (dtable::vfork_child_fixup): Avoid closing already closed
24 Fri Apr 20 16:29:00 2001 Corinna Vinschen <corinna@vinschen.de>
26 * grp.cc (getgroups): Change so that SIDs get compared instead
29 Fri Apr 20 14:50:00 2001 Corinna Vinschen <corinna@vinschen.de>
31 * Makefile.in: Add object files `sec_helper.cc' and `sec_acl.cc'.
32 * security.cc: Swap out several functions.
33 * sec_acl.cc: New file. Move Sun compatibel ACL functions from
34 `security.cc' to here.
35 * sec_helper.cc: New file. Move security helper functions from
36 `security.cc' to here.
37 * security.h: Changed to accomodate the above changes.
39 Fri Apr 20 14:12:00 2001 Corinna Vinschen <corinna@vinschen.de>
41 * grp.cc: Replace `group_in_memory_p' by `group_state'.
42 Eliminate group_sem throughout.
43 (enum grp_state): New enumeration type.
44 (read_etc_group): Make race safe.
45 * security.cc: Eliminate group_sem throughout.
47 Thu Apr 19 9:40:00 2001 Corinna Vinschen <corinna@vinschen.de>
49 * mmap.cc (mmap): Drop usage of the same memory area if the same
50 region of the same file is mapped twice.
52 Wed Apr 18 16:53:54 2001 Christopher Faylor <cgf@cygnus.com>
54 Throughout, change fdtab references to cygheap->fdtab.
55 * child_info.h (cygheap_exec_info): Eliminate special fdtab stuff.
56 * spawn.cc (spawn_guts): Ditto.
57 * cygheap.cc (cygheap_init): Initialize fdtab, if appropriate.
58 * cygheap.h (CYGHEAPSIZE): Include size of init_cygheap.
59 (_cmalloc_entry): Include fdtab here.
60 * dtable.h (dtable): Declare/define new methods.
61 * dtable.cc (dtable::vfork_child_fixup): New method.
62 (dtable::fixup_after_exec): Remove unneeded extra arguments.
63 * dcrt0.cc (dll_crt0_1): Ditto.
65 * environ.cc (getwinenv): Use case sensitive comparison.
66 (winenv): Make a copy of environment cache to avoid realloc problems
67 when duplicate environment variables exist in the environment. (From
70 * net.cc (cygwin_socket): Revert Apr 14 change.
72 * include/sys/file.h: Protect against previous X_OK definition.
74 Tue Apr 17 12:18:28 2001 Christopher Faylor <cgf@cygnus.com>
76 * passwd.cc: Eliminate passwd_sem throughout.
79 Tue Apr 17 12:18:28 2001 Robert Collins <rbtcollins@hotmail.com>
81 * cygwin.din: Export New functions.
82 * passwd.cc (read_etc_passwd): Make race safe.
83 (getpwuid_r): New function.
84 (getpwnam_r): New function.
86 2001-04-18 Egor Duda <deo@logos-m.ru>
88 * grp.cc (getgroups): Avoid crash if passwd field if /etc/group is
91 Tue Apr 17 19:05:44 2001 Christopher Faylor <cgf@cygnus.com>
93 * path.h (path_conv::add_ext_from_sym): Declare.
94 * path.cc (path_conv::add_ext_from_sym): Convert to pure inline method.
96 Tue Apr 17 18:50:00 2001 Corinna Vinschen <corinna@vinschen.de>
98 * path.cc (windows_device_names): Add missing NULL element.
100 Tue Apr 17 12:14:54 2001 Christopher Faylor <cgf@cygnus.com>
102 * path.cc (windows_device_names): Move dsp to proper location.
104 Tue Apr 17 13:44:00 2001 Corinna Vinschen <corinna@vinschen.de>
106 * path.cc (path_conv::check): Set case_clash even if pcheck_case
107 is set to PCHECK_ADJUST when a case clash is given for the last
109 (symlink_info::case_check): Ditto.
110 * syscalls.cc (_rename): Avoid overwriting an already existing file
111 if a case clash is given even if pcheck_case is set to PCHECK_ADJUST.
113 Tue Apr 17 2:07:07 2001 Christopher Faylor <cgf@cygnus.com>
115 * config.h.in: Turn off VFORK again.
117 Mon Apr 16 23:45:24 2001 Christopher Faylor <cgf@cygnus.com>
119 * path.h (cwdstuff): Move class.
120 * cygheap.h (cwdstuff): To here.
121 (init_cygheap): Add cwd field.
122 * child_info.h (cygheap_exec_info): Eliminate cwd stuff.
123 (child_info_spawn): Ditto.
124 * dcrt0.cc (dll_crt0_1): Remove cygcwd.fixup_after_exec call. Convert
125 cygcwd reference to cygheap->cwd.
126 * path.cc: Ditto, throughout.
127 (cwdstuff::copy): Eliminate.
128 (cwdstuff::fixup_after_exec): Ditto.
129 * spawn.cc (spawn_guts): Eliminate call to cygcwd.copy.
131 * fhandler.h (FH_OSS_DSP): Move into "fast" device category.
133 Mon Apr 16 19:19:00 2001 Corinna Vinschen <corinna@vinschen.de>
135 * mmap.cc: Move fh_paging_file from some functions to be
136 a global static variable.
137 (class mmap_record): Add `devtype_' member to remember
138 the device type of the file. Add declaration for methods
139 `get_device', `alloc_fh' and `free_fh'.
140 (mmap_record::mmap_record): Initialize `devtype_' correctly.
141 (mmap_record::alloc_fh): New method.
142 (mmap_record::free_fh): Ditto.
143 (munmap): Use new mmap_record::alloc_fh and mmap_record::free_fh
144 methods to create a correct fhandler.
146 (fixup_mmaps_after_fork): Ditto.
148 Mon Apr 16 16:01:00 2001 Corinna Vinschen <corinna@vinschen.de>
150 * grp.cc (getgroups): If `allow_ntsec' is set, use the process token
151 information to evaluate the groups list.
153 Mon Apr 16 00:08:02 2001 Christopher Faylor <cgf@cygnus.com>
155 * features.h: Remove this file as it is now being supplied by newlib.
157 Sun Apr 15 23:23:29 2001 Christopher Faylor <cgf@cygnus.com>
159 * autoload.cc: Add winmm functions needed by fhandler_dsp.cc.
161 Sun Apr 15 22:53:52 2001 Andy Younger <andylyounger@hotmail.com>
163 * fhandler_dsp.cc: New file. Implements OSS like /dev/dsp.
164 * include/sys/soundcard.h: New file. User land includes for OSS
166 * fhandler.h: Add new class fhandler_dev_dsp and a FH_OSS_DSP
168 * dtable.cc (dtable::build_fhandler): Allow creation of the /dev/dsp
170 * path.cc (windows_device_names): Add /dev/dsp into list of device
172 * Makefile.in (DLL_OFILES): Add fhandler_dsp.o.
174 Sun Apr 15 16:36:27 2001 Christopher Faylor <cgf@cygnus.com>
176 * uname.c (uname): Default n in in86 to 6 if Windows returns > 6.
178 Sun Apr 15 15:56:00 2001 Corinna Vinschen <corinna@vinschen.de>
180 * path.cc (add_ext_from_sym): Redefine to call `add_ext_from_sym_'.
181 (add_ext_from_sym_): New inline function.
183 Sat Apr 14 19:23:52 2001 Christopher Faylor <cgf@cygnus.com>
185 * config.h.in: Turn on VFORK by default.
187 Sat Apr 14 18:04:35 2001 Christopher Faylor <cgf@cygnus.com>
189 * net.cc (cygwin_socket): Set SO_LINGER to small value so closed UNIX
190 domain sockets will not stay around.
192 Sat Apr 14 18:01:43 2001 Pierre A. Humblet <Pierre.Humblet@ieee.org>
194 * select.cc (socket_cleanup): Set SO_LINGER to small value so closed
195 dummy sockets do not stay around. Use correct value for second argument
198 Sat Apr 14 17:04:00 2001 Robert Collins <rbtcollins@hotmail.com>
200 * thread.h (MTinterface): Add threadcount.
201 * thread.cc (MTinterface::Init): Set threadcount to 1.
202 (__pthread_create): Increment threadcount.
203 (__pthread_exit): Decrement threadcount and call exit() from the last thread.
205 Fri Apr 13 11:34:24 2001 Robert Collins <rbtcollins@hotmail.com>
207 * fork.cc (fork_child): Call the __pthread_atforkchild function.
208 (fork_parent): Call the __pthread_atforkparent function.
209 * cygwin.din: Export pthread_atfork.
210 * thread.h (callback): New class.
211 (MTinterface): Use it.
212 * thread.cc (__pthread_atforkprepare): New function.
213 (__pthread_atforkparent): New function.
214 (__pthread_atforkchild): New function.
215 (__pthread_atfork): New function.
216 * pthread.cc (pthread_atfork): New function.
218 Fri Apr 13 9:52:00 2001 Corinna Vinschen <corinna@vinschen.de>
220 * path.cc (add_ext_from_sym): New define evaluating `known'suffix'.
221 (path_conv::check): Use add_ext_from_sym throughout.
223 Thu Apr 12 23:19:00 2001 Corinna Vinschen <corinna@vinschen.de>
225 * dir.cc (mkdir): Check for case clash.
226 * environ.cc: Add extern declaration for `pcheck_case'.
227 (check_case_init): New function.
228 (struct parse_thing): Add "check_case" option.
229 * errno.cc (_sys_nerrlist): Add text for ECASECLASH.
230 (strerror): Add case branch for ECASECLASH.
231 * fhandler.cc (fhandler_disk_file::open): Check for case clash.
232 * path.cc: Add global variable `pcheck_case'.
233 (struct symlink_info): Add member `case_clash' and method `case_check'.
234 (path_prefix_p_): Call `pathnmatch' instead of `strncasematch'.
235 (pathnmatch): New funtion.
237 (path_conv::check): Add handling for case checking.
238 (symlink): Check for case clash.
239 (symlink_info::check): Add parameter for case checking.
240 Handle case checking.
241 (symlink_info::case_check): New method.
242 (chdir): Don't use unconverted path if pcheck_case==PCHECK_STRICT.
243 * path.h: Add extern declarations for `pathmatch' and
245 (enum case_checking): New enumeration type describing
246 the case checking behaviour of path conversion routines.
247 (class path_conv): Add member `case_clash'.
248 * syscalls.cc (_link): Check for case clash.
250 Thu Apr 12 12:49:53 2001 Christopher Faylor <cgf@cygnus.com>
252 * syscalls.cc (mkfifo): New function stub.
254 2001-04-12 Robert Collins <rbtcollins@hotmail.com>
256 * configure.in: Remove PTH_ALLOW.
257 * cygwin.din: Remove @PTH_ALLOW@ prefixes to pthread functions. Add
259 * pthread.cc: New wrapper functions for the above new exports.
260 * sched.cc (valid_sched_parameters): New function.
261 (sched_setparam): Use it.
262 (sched_set_thread_priority): New function. Used by pthread_sched*.
263 * thread.cc (pthread_key_destructor::InsertAfter): New function.
264 (pthread_key_destructor::UnlinkNext): New function.
265 (pthread_key_destructor::Next): New function.
266 (pthread_key_destructor_list::Insert): New function.
267 (pthread_key_destructor_list::Remove): New function.
268 (pthread_key_destructor_list::Pop): New function.
269 (pthread_key_destructor::pthread_key_destructor): New function.
270 (pthread_key_destructor_list::IterateNull): New function.
271 (MTinterface::Init): Initialise new member.
272 (pthread::pthread): Initialise new members.
273 (pthread::create): Copy new attributes. Set the new thread priority.
274 (pthread_attr::pthread_attr): Initialise new members.
275 (pthread_key::pthread_key): Setup destructor function.
276 (pthread_key::~pthread_key): Remove destructor function.
277 (pthread_mutexattr::pthread_mutexattr): New function.
278 (pthread_mutexattr::~pthread_mutexattr): New function.
279 (__pthread_once): New function.
280 (__pthread_cleanup): New function.
281 (__pthread_cancel): New function.
282 (__pthread_setcancelstate): New function.
283 (__pthread_setcanceltype): New function.
284 (__pthread_testcancel): New function.
285 (__pthread_attr_getinheritsched): New function.
286 (__pthread_attr_getschedparam): New function.
287 (__pthread_attr_getschedpolicy): New function.
288 (__pthread_attr_getscope): New function.
289 (__pthread_attr_setinheritsched): New function.
290 (__pthread_attr_setschedparam): New function.
291 (__pthread_attr_setschedpolicy): New function.
292 (__pthread_attr_setscope): New function.
293 (__pthread_exit): Call any key destructors on thread exit.
294 (__pthread_join): Use the embedded attr values.
295 (__pthread_detach): Use the embedded attr values.
296 (__pthread_getconcurrency): New function.
297 (__pthread_getschedparam): New function.
298 (__pthread_key_create): Pass the destructor on object creation.
299 (__pthread_key_delete): Correct incorrect prototype.
300 (__pthread_setconcurrency): New function.
301 (__pthread_setschedparam): New function.
302 (__pthread_cond_timedwait): Support static mutex initialisers.
303 (__pthread_cond_wait): Ditto.
304 (__pthread_mutex_getprioceiling): New function.
305 (__pthread_mutex_lock): Support static mutex initialisers.
306 (__pthread_mutex_trylock): Ditto.
307 (__pthread_mutex_unlock): Ditto.
308 (__pthread_mutex_destroy): Ditto.
309 (__pthread_mutex_setprioceiling): New function.
310 (__pthread_mutexattr_getprotocol): New function.
311 (__pthread_mutexattr_getpshared): New function.
312 (__pthread_mutexattr_gettype): New function.
313 (__pthread_mutexattr_init): New function.
314 (__pthread_mutexattr_destroy): New function.
315 (__pthread_mutexattr_setprotocol): New function.
316 (__pthread_mutexattr_setprioceiling): New function.
317 (__pthread_mutexattr_getprioceiling): New function.
318 (__pthread_mutexattr_setpshared): New function.
319 (__pthread_mutexattr_settype): New function. Remove stubs for non
321 * thread.h: Remove duplicate #defines. Add prototypes for new
322 functions in thread.cc.
323 (pthread_key_destructor): New class.
324 (pthread_key_destructor_list): New class.
325 (pthread_attr): Add new members.
326 (pthread): Remove members that are duplicated in the pthread_attr
328 (pthread_mutex_attr): Add new members.
329 (pthread_once): New class.
330 * include/pthread.h: Add prototypes for new functions exported from
331 cygwin1.dll. Remove typedefs.
332 * include/sched.h: Add prototypes for new functions in sched.cc.
333 * include/cygwin/types.h: Add typedefs from pthread.h
335 Tue Apr 10 22:02:53 2001 Christopher Faylor <cgf@cygnus.com>
337 * path.cc (struct symlink_info): Add extn and ext_tacked_on fields.
338 (path_conv::check): Only tack on extension if a known one didn't
340 (suffix_scan::has): Return pointer to known extension.
341 (symlink_info::check): Record location of extension, if any.
343 2001-04-09 Egor Duda <deo@logos-m.ru>
345 * fhandler.h (class fhandler_socket): Add members and methods to
346 support secure connections on AF_UNIX sockets.
347 * fhandler_socket.cc (fhandler_socket::set_connect_secret): New method.
348 (fhandler_socket::get_connect_secret): Ditto.
349 (fhandler_socket::create_secret_event): Ditto.
350 (fhandler_socket::close_secret_event): Ditto.
351 (fhandler_socket::check_peer_secret_event): Ditto.
352 (fhandler_socket::fixup_after_fork): Duplicate secret event to child.
353 (fhandler_socket::dup): Copy address family.
354 (fhandler_socket::close): Close secret event.
355 * net.cc (get_inet_addr): Read secret cookie.
356 (cygwin_connect): Check if peer knows secret cookie value.
357 (cygwin_accept): Ditto. Copy address family to newly created socket.
358 (cygwin_bind): Generate and write secret cookie.
359 (wsock_init): Initialize random number generator.
361 Sun Apr 8 20:40:58 2001 Christopher Faylor <cgf@cygnus.com>
363 * Makefile.in: Put -lgcc last in list of libraries, since stdc++
365 * cygwin.din: Remove obsolete "__empty" export.
366 * exceptions.cc (call_signal_handler_now): Force inclusion of function
367 even when -finline-functions is specified.
368 * sigproc.h: Remove obsolete call_signal_handler declaration.
370 Sun Apr 8 20:36:55 2001 Benjamin Riefenstahl <Benjamin.Riefenstahl@epost.de>
372 * fhandler_console.cc (cp_get_internal): New function.
373 (cp_convert): New function.
374 (con_to_str): New function.
375 (str_to_con): New function.
376 (fhandler_console::read): Replace OemToCharBuff with con_to_str.
377 (fhandler_console::write_normal): Replace CharToOemBuff with str_to_con.
379 Thu Apr 5 22:41:00 2001 Corinna Vinschen <corinna@vinschen.de>
381 * syscalls.cc (stat_worker): Fix conditional which still allowed
382 successful stat'ing of non-existant files.
384 Wed Apr 4 10:37:44 2001 Christopher Faylor <cgf@cygnus.com>
386 * child_info.h: Bump magic number for fork/exec/spawn.
388 Tue Apr 3 20:06:00 2001 Corinna Vinschen <corinna@vinschen.de>
390 * errno.cc (errmap): Map ERROR_FILE_INVALID to ENXIO.
392 Mon Apr 2 22:48:58 2001 Christopher Faylor <cgf@cygnus.com>
394 * cygrun.c (main): Fix compiler warning.
395 * gmon.c (_mcleanup): Ditto.
396 * profil.c (profile_off): Ditto.
398 * net.cc (find_winsock_errno): New function.
399 (__set_winsock_errno): Use find_winsock_errno.
400 (cygwin_setsockopt): Detect SO_ERROR for debugging.
401 (cygwin_getsockopt): Ditto. Translate error when getsockopt returns
403 * winsup.h: regparmize __set_winsock_errno.
404 * include/sys/strace.h: Document that strace functions can't use
407 2001-04-02 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
409 * fhandler.cc (fhandler_disk_file::open): Avoid checking a magic
410 number of a directory.
412 Mon Apr 2 00:24:08 2001 Christopher Faylor <cgf@cygnus.com>
414 * shared_info.h (mount_info): Remove mnt_ elements.
415 * thread.h (struct _winsup_t): Add mnt_ elements.
416 * path.cc (fillout_mntent): Use mnt_ elements from reent_winsup ().
418 Sun Apr 1 20:10:34 2001 Christopher Faylor <cgf@cygnus.com>
420 * exceptions.cc (sigframe::call_signal_handler): Return value of
421 call_signal_handler_now.
422 * sigproc.h (sigframe): Use constructor.
423 * syscalls.cc (_read): Correct errno test prior to calling signal
426 Sun Apr 1 00:38:06 2001 Christopher Faylor <cgf@cygnus.com>
428 * exceptions.cc (sigframe::call_signal_handler): Move outside of "C"
429 block or some compilers will complain.
431 Sun Apr 1 00:24:14 2001 Christopher Faylor <cgf@cygnus.com>
433 * exceptions.cc (call_signal_handler_now): Rename from
434 call_signal_handler to avoid C++ confusion.
436 Sun Apr 1 00:08:15 2001 Christopher Faylor <cgf@cygnus.com>
438 * path.cc (fillout_mntent): Always remove drive root directories from
439 future consideration by "/cygdrive" reporting.
440 (cygdrive_getmnt): Avoid reporting removable drives or drives with no
443 Sat Mar 31 21:56:19 2001 Christopher Faylor <cgf@cygnus.com>
445 * thread.h (struct _winsup_t): Remove obsolete elements. Add
446 available_drives element.
447 * path.cc (mount_info::getmntent): Report "/cygdrive" drives when
448 mounted drives are exhausted.
449 (fillout_mntent): New function.
450 (mount_item::getmntent): Use fillout_mntent.
451 (cygdrives_mntent): New function. Returns next available "/cygdrive".
452 (setmntent): Initialize available "/cygdrives".
453 * syscalls.cc: Remove some if 0'ed code.
454 * times.cc (timezone): Use more descriptive variable name.
456 Sat Mar 31 18:59:52 2001 Christopher Faylor <cgf@cygnus.com>
458 * sigproc.h (class sigframe): Implement 'unregister()' method.
459 (sigframe::~sigframe): Use unregister method.
460 (sigframe::call_signal_handler): Declare new method.
461 * exceptions.cc (sigframe::call_signal_handler): New method.
462 Unregisters current sigframe before calling signal handler.
463 (setup_handler): Clear waiting threads prior to arming signal_arrived.
464 * syscalls.cc (_read): Change goto to loop. Recalculate sigframe
465 inside of loop so that constructor is called when appropriate.
466 * wait.cc (wait4): Ditto.
468 * signal.cc: Change "sig" to "signal" in debugging messages throughout.
471 Sat Mar 31 17:12:08 2001 Christopher Faylor <cgf@cygnus.com>
473 * fhandler_serial.cc (fhandler_serial::raw_write): Close protected
474 handles with ForceCloseHandle or suffer spurious warnings.
476 Sat Mar 31 16:23:32 2001 Christopher Faylor <cgf@cygnus.com>
478 * fhandler.cc (fhandler_base::read): Remove special handling of CTRL-Z.
480 Sat Mar 31 11:09:00 2001 Corinna Vinschen <corinna@vinschen.de>
482 * fhandler.h (class fhandler_console): Add members `insert_mode'.
483 * fhandler_console.cc (fhandler_console::dup): Duplicate `insert_mode'.
484 (fhandler_console::fhandler_console): Initialize `insert_mode'.
485 (fhandler_console::char_command): Add terminal capabilities
486 "enter insert mode" = \E[4h and "exit insert mode" = \E[4l.
487 Care for insert mode on terminal capability "repeat char" = \E[x;yb.
488 (fhandler_console::write_normal): Care for insert mode before writing
490 (array keytable): Add keymapping for modified cursor and control
491 block keys (xterm like).
493 Fri Mar 30 13:02:00 2001 Corinna Vinschen <corinna@vinschen.de>
495 * fhandler.h (class fhandler_console): Add members `savebufsiz' and
496 `savebuf' to allow save/restore of screen.
497 * fhandler_console.cc (fhandler_console::dup): Duplicate `savebufsiz'
499 (fhandler_console::fhandler_console): Initialize `savebufsiz' and
501 (fhandler_console::char_command): Add terminal capabilities
502 "save screen content" = \E[?47h and "restore screen content" = \E[?47l.
504 Wed Mar 28 19:28:50 2001 Christopher Faylor <cgf@cygnus.com>
506 * path.cc (chdir): Eat trailing whitespace on input path.
508 Tue Mar 27 22:38:42 2001 Christopher Faylor <cgf@cygnus.com>
510 * lib/_cygwin_S_IEXEC.c: Remove "const" from globals or they never seem
511 to be defined. Wrap definitions in extern "C". Include winsup.h to
512 assure proper definitions.
514 * dcrt0.cc (dll_crt0_1): Call stdio_init after premain run so that
515 binmode.o, etc., will control default stdio settings.
516 * dtable.cc (dtable::init_std_file_from_handle): Allow __fmode to force
517 binmode/textmode settings. Default pipes to binmode.
519 Tue Mar 27 11:31:00 2001 Corinna Vinschen <corinna@vinschen.de>
521 * mmap.cc (mmap): Fix conditional for previous patch.
523 Mon Mar 26 18:48:00 2001 Corinna Vinschen <corinna@vinschen.de>
525 * mmap.cc (mmap): Outflank copy-on-write problem on 9x by
526 setting access mode to FILE_MAP_READ when read access is requested.
528 Sun Mar 25 20:12:21 2001 Christopher Faylor <cgf@cygnus.com>
530 * dlfcn.cc (check_access): Eliminate.
531 (check_path_access): Use passed in path_conv buf.
532 (get_full_path_of_dll): Use passed in name buf to avoid a static. Rip
533 out most of the path checking since LoadLibrary will do all of this
535 (dlopen): Set errno when appropriate (may not be compliant?).
536 * environ.cc (posify): Don't pass in "native" path if it seems to
539 Thursday Mar 22 2001 Robert Collins <rbtcollins@hotmail.com>
541 * fhandler.h (fhandler_dev_clipboard): Extend to support writing.
542 * fhandler_clipboard.cc (fhandler_dev_clipboard::fhandler_dev_clipboard):
543 Initialize new fields. Open clipboard here.
544 (fhandler_dev_clipboard::dup): New method.
545 (fhandler_dev_clipboard::open): Accomodate new fields. Register
546 clipboard here, if appropriate.
547 (set_clipboard): New function. Moves buffer to clipboard.
548 (fhandler_dev_clipboard::write): Truly implement clipboard writing.
549 (fhandler_dev_clipboard::read): Reimplement to allow successive reads.
550 (fhandler_dev_clipboard::lseek): Truly implement seeks in clipboard.
551 (fhandler_dev_clipboard::close): Clear out new fields. Support
552 sequential reads and sequential writes. Support for binary data via a
553 native clipboard format.
555 2001-03-22 Egor Duda <deo@logos-m.ru>
557 * fhandler_console.cc (fhandler_console::set_default_attr): Update
558 console color attributes on tty reset.
560 Wed Mar 21 22:12:36 2001 Christopher Faylor <cgf@cygnus.com>
562 * autoload.cc (kernel32_init): New function for kernel32 autoload
564 (SignalObjectAndWait): Add conditional load of this function when it is
567 2001-03-21 Robert Collins <rbtcollins@hotmail.com>
569 * sched.cc: New file. Implement sched*.
570 * include/sched.h: New file. User land includes for sched*.
571 * Makefile.in: Add sched.o
572 * cygwin.din: Add exports for sched*.
574 Tue Mar 20 14:48:46 2001 Christopher Faylor <cgf@cygnus.com>
576 * dtable.cc: Guard against new winsock.h/winsock2.h warnings when
577 mixing winsock*.h and sys/types.h.
578 * fhandler_socket.cc: Ditto.
581 * exceptions.cc: Remove unneeded define.
583 Mon Mar 19 17:43:29 2001 Christopher Faylor <cgf@cygnus.com>
585 * exceptions.cc (interruptible): Update debugging output.
586 (setup_handler): Ensure that wait_sig loop wakes up when we punt on
588 * poll.cc (poll): Add signal guard here.
590 2001-03-19 Egor Duda <deo@logos-m.ru>
592 * tty.h (tty::create_inuse): Add new parameter to allow non-
593 inheritable 'inuse' events.
594 * tty.cc (tty::create_inuse): Use new parameter.
595 * fhandler_tty.cc (fhandler_tty_master::init): Ditto.
596 * fhandler_tty.cc (fhandler_pty_master::open): Ditto.
597 * fhandler_tty.cc (fhandler_tty_master::init): Create master_alive
599 * tty.cc (tty_list::terminate): Close master_alive event.
600 * fhandler_tty.cc (fhandler_tty_common::close): Send EOF to slaves
601 when master side is closed.
603 Mon Mar 19 14:32:00 2001 Corinna Vinschen <corinna@vinschen.de>
605 * mmap.cc (map::get_list_by_fd): Avoid calling `get_namehash' when
606 file descriptor is -1.
608 Sat Mar 17 18:30:00 2001 Corinna Vinschen <corinna@vinschen.de>
610 * syscalls.cc (check_posix_perm): New static function.
611 (fpathconf): Add _PC_POSIX_PERMISSIONS and _PC_POSIX_SECURITY
614 * include/cygwin/version.h: Bump API minor number to 37.
616 2001-03-18 Egor Duda <deo@logos-m.ru>
618 * fhandler.h (fhandler_tty_slave): Declare new methods.
619 * select.cc (fhandler_tty_slave::select_read): New method.
620 * select.cc (fhandler_tty_slave::ready_for_read): Ditto.
621 * select.cc (verify_tty_slave): New function.
622 * fhandler_termios.cc (fhandler_termios::line_edit): Empty input
624 * fhandler_tty.cc (fhandler_tty_slave::read): Check for input data
625 after reading from pipe. Reset event if input pipe is empty.
626 * tty.h (class tty): Allow creating events with manual reset.
627 * tty.cc (tty::get_event): Use manual_reset flag.
628 * tty.cc (tty::common_init): Create input_available_event with
631 Sat Mar 17 21:48:03 2001 Christopher Faylor <cgf@cygnus.com>
633 * external.cc (fillout_pinfo): Match windows pid, as well as cygwin pid
634 when passed in pid. Don't prematurely break when searching for a pid.
636 * thread.h (_winsup_t): Eliminate unneeded field.
638 Sat Mar 17 20:46:00 2001 Corinna Vinschen <corinna@vinschen.de>
640 * net.cc (get_95_ifconf): Use strcasematch instead of strcasecmp.
641 * syscalls.cc (_unlink): Ditto.
644 Sat Mar 17 12:43:15 2001 Christopher Faylor <cgf@cygnus.com>
646 * path.cc (suffix_scan::next): Avoid searching for foo.lnk twice when
649 Sat Mar 17 18:10:00 2001 Corinna Vinschen <corinna@vinschen.de>
651 * net.cc (cygwin_socket): Set protocol to 0 when address family is
652 AF_UNIX to avoid WSAEPROTONOSUPPORT error.
654 Sat Mar 17 09:51:32 2001 Mathew Brozowski <brozow@tavve.com>
656 * net.cc (cygwin_socket): Pass protocol parameter to socket call.
658 Sat Mar 17 02:05:38 2001 Christopher Faylor <cgf@cygnus.com>
660 * dir.cc (readdir): Use strcasematch for consistency.
661 * path.cc (symlink_info): Eliminate known_suffix.
662 (path_conv::check): Always copy ext_here to end of buffer, if found.
663 (suffix_scan): Eliminate ext_here, add suffixes_start.
664 (suffix_scan::has): Eliminate an argument. Reorganize. Always return
665 pointer to end of input path.
666 (suffix_scan::next): Take a second pass through the suffix list looking
668 (symlink_info::check): Eliminate known_suffix usage.
670 Sat Mar 17 00:10:52 2001 Christopher Faylor <cgf@cygnus.com>
672 * syscalls.cc (stat_dev): Give devices full read/write by default.
674 Saturday Mar 17 3:45 2001 Robert Collins <rbtcollins@hotmail.com>
676 * thread.cc (MTinterface::CreateCond): Check for null attr pointer.
678 Fri Mar 16 21:13:23 2001 Christopher Faylor <cgf@cygnus.com>
680 * fhandler_termios.cc (fhandler_termios::line_edit): Don't accept input
681 when a signal is sent or we'll end up in an EOF/signal race.
683 Fri Mar 16 20:25:40 2001 Christopher Faylor <cgf@cygnus.com>
685 * path.cc: Translate scan states from defines to enums.
686 (suffix_scan): Rename state to nextstate for clarity.
687 (lnk_match): Change to allow multiple states to indicate that a .lnk
689 (suffix_scan::has): Eliminate a goto. Handle .lnk as a special case,
690 since a .lnk may also need to be tacked on the end of a .lnk.
691 (suffix_scan::next): Don't increment next state. Set it specifically.
692 Recognize new .lnk states.
694 Saturday Mar 17 01:19 2001 Robert Collins rbtcollins@hotmail.com
696 * cygwin.din: Export the new functions.
697 * pthread.cc (pthread_cond_*): Add wrapper functions that call
698 __pthread_cond* functions.
699 * thread.cc (__pthread_cond_*): Implement the pthread_cond* functions.
700 * thread.h: Add new class entries and prototypes for __pthread_cond*
702 * include/pthread.h: user land header prototypes for pthread_cond*
703 functions and related defines.
705 Wed Mar 14 16:30:00 2001 Corinna Vinschen <corinna@vinschen.de>
707 * environ.cc (parse_options): Use strtok_r instead of strtok.
708 * security.cc (convert_string_sid_to_sid): Ditto.
709 (aclfromtext): Ditto. Fix buffer usage.
711 Wed Mar 14 10:11:00 2001 Corinna Vinschen <corinna@vinschen.de>
713 * path.cc (lnk_suffixes): Remove.
714 (class suffix_scan): Add `lnk_state' flag.
715 (suffix_scan::lnk_match): Return state of `lnk_state' now.
716 (suffix_scan::has): Changed behaviour if file has `.lnk' suffix.
717 (suffix_scan::next): Set `lnk_state' where appropriate.
718 (symlink_info::check): Fix a wrong `break'.
719 * syscalls.cc (chown_worker): Change debug statement to reflect
721 (lchown): Call chown_worker with `PC_SYM_NOFOLLOW' instead of
724 Tue Mar 13 13:52:00 2001 Corinna Vinschen <corinna@vinschen.de>
726 * fhandler.cc (fhandler_disk_file::fstat): Add correct modes to
727 symlinks when stat'ing on FAT or FAT32 file systems.
729 2001-03-12 Egor Duda <deo@logos-m.ru>
731 * fhandler.h (fhandler_termios::fixup_after_exec): New function.
732 * fhandler_termios.cc (fhandler_termios::fixup_after_fork): New
733 function. Fixup output handle.
734 * fhandler_tty.cc (fhandler_tty_common::fixup_after_fork): Output
735 handle is now fixed up in fhandler_termios::fixup_after_fork().
737 2001-03-12 Egor Duda <deo@logos-m.ru>
739 * fhandler.h (fhandler_termios::fhandler_termios): Enable fixup
741 * fhandler_console.cc (fhandler_console::fhandler_console): Fixup
742 after fork is now enabled in the base class constructor.
744 Mon Mar 12 11:19:41 2001 Christopher Faylor <cgf@cygnus.com>
746 * mkvers.sh: Include config.h so that DEBUGGING is correctly defined.
748 Mon Mar 12 09:47:55 2001 Christopher Faylor <cgf@cygnus.com>
750 * spawn.cc (spawn_guts): Don't set EXIT_REPARENTING if parent process
751 is not a cygwin process (suggested by Jason Gouger
752 <cygwin@jason-gouger.com>).
754 Sun Mar 11 16:00:58 2001 Christopher Faylor <cgf@cygnus.com>
756 * child_info.h: Bump magic number for fork/exec/spawn.
758 Sat Mar 10 20:54:47 2001 Christopher Faylor <cgf@cygnus.com>
760 * autoload.cc (noload): Use proper method for multiline strings or
761 newer gcc's complain.
762 * exceptions.cc (unused_sig_wrapper): Ditto.
763 * fhandler.h (fhandler_base): Make get_io_handle and friends return
765 * fhandler_tty.cc (fhandler_pty_common::close_on_exec): Accomodate
766 DEBUGGING flag to avoid spurious warnings when inheritance is set.
768 Sat Mar 10 16:52:12 2001 Christopher Faylor <cgf@cygnus.com>
770 * shortcut.c (PATH_ALL_EXEC): Add parentheses to avoid a compiler
773 * exceptions.cc (setup_handler): Clarify debugging message.
774 * sigproc.cc (proc_subproc): Remove PROC_CHILDSTOPPED test. It is
775 handled by normal PROC_CLEARWAIT case.
776 (wait_sig): Eliminate "dispatched" tracking. Remove __SIGCHILDSTOPPED
777 test. Decrement counter again before jumping out of
778 InterlockedDecrement loop so that subsequent InterlockedIncrement will
779 keep the counter at the correctly decremented value and also detect
780 when there are pending signals.
781 * sigproc.h: Remove __SIGCHILDSTOPPED element.
782 (procstuff): Remove PROC_CHILDSTOPPED element.
784 Sat Mar 10 15:22:44 2001 Christopher Faylor <cgf@cygnus.com>
786 * syscalls.cc (_rename): Set errno to ENOENT when an old path doesn't
787 exist (from Kazuhiro Fujieda <fujieda@jaist.ac.jp>). Also set EACCES
788 when directory is not writable.
790 Wed Mar 7 15:49:47 2001 Christopher Faylor <cgf@cygnus.com>
792 * syscalls.cc (_read): Change definition to return ssize_t to be
793 consistent with read.
794 (_write): Change definition to return ssize_t to be consistent with
797 Wed Mar 7 01:08:21 2001 Christopher Faylor <cgf@cygnus.com>
799 * sigproc.h (sigthread): Declare new methods. Create new winapi_lock
801 (sigframe:;set): Call get_winapi_lock after frame is set so that signal
802 handler thread knows not to call SuspendThread.
803 (sigframe::~sigframe): Release winapi_lock.
804 * exceptions.cc (sigthread::get_winapi_lock): New method.
805 (sigthread::release_winapi_lock): New method.
806 (setup_handler): Use get_winapi_lock to ensure that signalled thread is
807 not blocked in a Windows API.
809 * path.h (path_types): Avoid broken GCC warning.
811 Tue Mar 6 14:02:00 2001 Corinna Vinschen <corinna@vinschen.de>
813 * path.cc (suffix_scan::has): Change order of conditionals
814 to allow checking for .lnk suffixes even if in_suffixes is empty.
816 Tue Mar 6 13:02:00 2001 Corinna Vinschen <corinna@vinschen.de>
818 * autoload.c (cygwin_premain0): Add missing parameter.
819 * binmode.c (cygwin_premain0): Ditto.
820 * textmode.c (cygwin_premain0): Ditto.
822 Tue Mar 6 12:04:00 2001 Jason Tiller <jtiller@sjm.com>
824 * auto_load.cc: Add "GetKeyboardLayout" entry in the list of
825 Win32 User32.DLL exports to provide.
826 * fhandler.h (class fhandler_console): Add meta_mask private
827 member to remember which keystroke modifiers should generate
829 * fhandler_console.cc (fhandler_console::read): Modify code that
830 tests a keystroke for a META-escaped key to use the 'meta_mask'
832 (fhandler_console::fhandler_console): Add definition for
833 variable "meta_mask" used to determine if a keystroke should be
834 preceded by META in the client console stream. Set meta_mask
835 based on whether or not user's keyboard language is English -
836 non-English keyboards pass AltGr (right <ALT>) unmolested,
837 whereas English keyboards now interpret left- and right-<ALT>
840 Mon Mar 5 20:15:00 2001 Corinna Vinschen <corinna@vinschen.de>
842 * include/a.out.h: Add copyright hint.
843 * include/fcntl.h: Ditto.
844 * include/lastlog.h: Ditto.
845 * include/memory.h: Ditto.
846 * include/mntent.h: Ditto.
847 * include/paths.h: Ditto.
848 * include/poll.h: Ditto.
849 * include/syslog.h: Ditto.
850 * include/termio.h: Ditto.
851 * include/tzfile.h: Ditto.
852 * include/arpa/inet.h: Ditto.
853 * include/asm/byteorder.h: Ditto.
854 * include/asm/socket.h: Ditto.
855 * include/asm/types.h: Ditto.
856 * include/cygwin/if.h: Ditto.
857 * include/cygwin/mtio.h: Ditto.
858 * include/cygwin/rdevio.h: Ditto.
859 * include/cygwin/socket.h: Ditto.
860 * include/net/if.h: Ditto.
861 * include/netinet/in.h: Ditto.
862 * include/netinet/in_systm.h: Ditto.
863 * include/netinet/ip.h: Ditto.
864 * include/netinet/ip_icmp.h: Ditto.
865 * include/netinet/tcp.h: Ditto.
866 * include/sys/cdefs.h: Ditto.
867 * include/sys/cygwin.h: Ditto.
868 * include/sys/ioctl.h: Ditto.
869 * include/sys/mman.h: Ditto.
870 * include/sys/mount.h: Ditto.
871 * include/sys/mtio.h: Ditto.
872 * include/sys/procfs.h: Ditto.
873 * include/sys/resource.h: Ditto.
874 * include/sys/smallprint.h: Ditto.
875 * include/sys/socket.h: Ditto.
876 * include/sys/strace.h: Ditto.
877 * include/sys/syslog.h: Ditto.
878 * include/sys/sysmacros.h: Ditto.
879 * include/sys/termio.h: Ditto.
880 * include/sys/termios.h: Ditto.
881 * include/sys/uio.h: Ditto.
882 * include/sys/un.h: Ditto.
883 * include/sys/utsname.h: Ditto.
884 * include/sys/vfs.h: Ditto.
885 * include/sys/wait.h: Ditto.
886 * regexp/regerror.c: Ditto.
887 * regexp/regexp.h: Ditto.
888 * regexp/regmagic.h: Ditto.
890 Mon Mar 5 01:25:03 2001 Christopher Faylor <cgf@cygnus.com>
892 * dlopen.c (dlopen): Return NULL when name is NULL (suggested by
895 * cygwin.din: Add a new, internally used export -
896 _check_for_executable.
897 * dcrt0.cc (dll_crt0_1): Set _check_for_executable for older binaries.
898 Pass user_data to premain functions.
899 * fhandler.cc (fhandler_disk_file::open): Only check for executable if
900 the linked program is intereested in the executable bit.
901 (fhandler_disk_file::check_execable_p): Delete.
902 * fhandler.h (executable_states): New enumeration of various states of
903 executable bit caring.
904 (fhandler_base::set_execable_p): New method.
906 * fhandler_termios.cc (fhandler_termios::line_edit): Flag when a signal
907 has been sent to the tty. Return -1 when this is so.
908 * fhandler_console.cc (fhandler_console::read): Return -1 when signal
909 sending character encountered.
911 * path.cc (path_conv::check): Record when path refers to a disk device.
912 Move executable extension check here.
913 (check_sysfile): Accomodate new EXEC path states.
914 (has_suffix): Remove.
915 (next_suffix): Remove.
916 (class suffix_scan): New clas.
917 (suffix_scan::has): New method.
918 (suffix_scan:next): New method.
919 (symlink_info::check): Use suffix_scan method to control for scanning
921 * path.h (path_conv::exec_state): New method.
922 * perprocess.h: Make "C" friendly.
923 * include/cygwin/version.h: Define CYGWIN_VERSION_CHECK_FOR_S_IEXEC.
924 Bump CYGWIN_VERSION_API_MINOR.
925 * include/sys/cygwin.h: Change premain declarations.
927 * winsup.h: Move __cplusplus test to after builtin defines.
929 2001-03-04 Egor Duda <deo@logos-m.ru>
931 * fhandler.h (class fhandler_tty_common): New mutex and event to
932 syncronize input on master tty with slave tty.
933 * fhandler_tty.cc (fhandler_pty_master::accept_input): Use them to
934 syncronize with slave.
935 * fhandler_tty.cc (fhandler_tty_slave::read): Use input mutex and
936 event to syncronize with master. Do not limit amount of data read
937 from master to vmin value. Interrupt on signal and return already
939 * fhandler_tty.cc (fhandler_tty_slave::open): Handle input mutex and
941 * fhandler_tty.cc (fhandler_tty_common::close): Ditto.
942 * fhandler_tty.cc (fhandler_tty_common::set_close_on_exec): Ditto.
943 * fhandler_tty.cc (fhandler_tty_common::fixup_after_fork): Ditto.
944 * fhandler_tty.cc (fhandler_tty_common::dup): Ditto.
945 * tty.h (tty::open_input_mutex): New function.
946 * tty.cc (tty::common_init): Create input mutex and event.
948 Fri Mar 2 13:32:00 2001 Corinna Vinschen <corinna@vinschen.de>
950 * dir.cc (readdir): Fix creating path in symlink check.
952 Fri Mar 2 12:33:00 2001 Corinna Vinschen <corinna@vinschen.de>
954 * dir.cc (readdir): Fix shortcut==symlink condition.
955 * environ.cc: Add extern decl for `allow_winsymlinks'.
956 (struct parse_thing): Add entry for `[no]winsymlinks'.
957 * path.cc (symlink): Change to be able to create both,
958 symlink==shortcut and symlink==systemfile, dependent of
959 the setting of `allow_winsymlinks'.
960 * security.cc (cygwin_logon_user): Add debug output.
961 * shortcut.c: Add defines from path.h.
962 (has_exec_chars): Copy from path.h.
963 (check_shortcut): Check for executable file condition if not a
966 Thu Mar 1 21:06:07 2001 Christopher Faylor <cgf@cygnus.com>
968 * exceptions.cc (sig_handle_tty_stop): Ignore attempts to suspend a
969 process if started by non-cygwin parent.
971 Thu Mar 1 20:48:11 2001 Christopher Faylor <cgf@cygnus.com>
973 * select.cc (peek_console): Don't report read_ready on mouse events
974 unless we are looking for mouse events.
975 * fhandler.h (fhandler_console::mouse_aware): New method.
977 Wed Feb 28 15:10:00 2001 Corinna Vinschen <corinna@vinschen.de>
979 * uinfo.cc: Eliminate `#include <wchar.h>'.
981 2001-02-28 Egor Duda <deo@logos-m.ru>
983 * fhandler_floppy.cc (fhandler_dev_floppy::lseek): Determine
984 drive geometry or partition size to allow seeking from the end of
985 raw floppy device. Don't allow positioning past the end of media or
986 to offsets bigger then max off_t.
988 2001-02-27 Egor Duda <deo@logos-m.ru>
990 * fhandler.h (class fhandler_console): Make all variables that
991 describe "state" of console to be members of fhandler_console.
992 default_color is now the color which is set when console recieves
994 * fhandler_console.cc (fhandler_console::fhandler_console): Turn
995 mouse handling and raw keyboard mode off by default. Initialize
997 * fhandler.cc (fhandler_console::set_raw_win32_keyboard_mode): New
999 * fhandler_console.cc (fhandler_console::set_default_attr): New
1000 function. Reset console attributes to default values.
1001 * fhandler_console.cc (fhandler_console::open): Reset attributes.
1002 * fhandler_console.cc (fhandler_console::get_win32_attr): New function.
1003 Calculate win32-style console attribute based on terminal attributes.
1004 * fhandler_console.cc (fhandler_console::set_cursor_maybe): Use
1006 * fhandler_console.cc (fhandler_console::read): If in raw-win32
1007 keyboard mode, encode win32 keyboard events in \033{x;y;z;t;u;wK
1009 * fhandler_console.cc (fhandler_console::dup): Copy all state
1010 information to the dup()ed handle.
1011 * fhandler_console.cc (fhandler_console::scroll_screen): Use current
1013 * fhandler_console.cc (fhandler_console::clear_screen): Ditto.
1014 * fhandler_console.cc (fhandler_console::char_command): Check if we
1015 saw '?' symbol by member variable. Set terminal attributes on \033[Xm
1016 commands. \033[24m - turn off underline mode, \033[27m - turn off
1017 reverse mode, \033[39m - restore default foreground color.
1018 \033[49m - restore default background color. \033[2000h - turn on raw
1019 keyboard mode, \033[2000l - turn off raw keyboard mode.
1020 * fhandler_console.cc (fhandler_console::write): Set attribues to
1021 default values on reset command.
1023 2001-02-26 Mike Simons <msimons@moria.simons-clan.com>
1025 * times.cc (settimeofday): Replace function stub with working code.
1027 Mon Feb 26 10:42:00 2001 Corinna Vinschen <corinna@vinschen.de>
1029 * strace.cc (strace::vprntf): Move prntf functionality to this function
1030 adding an va_list interface to strace.
1031 (strace::printf): Calls strace::vprntf now.
1032 (strace_printf): New function providing an extern "C" interface to
1034 * include/sys/strace.h: Make plain C clean.
1035 (class strace): Add `vprntf' method.
1037 Mon Feb 26 0:10:00 2001 Corinna Vinschen <corinna@vinschen.de>
1039 * shortcut.c: Remove #include <sys/strace.h>.
1041 Sun Feb 25 10:32:00 2001 Corinna Vinschen <corinna@vinschen.de>
1043 * path.cc (symlink): Add a ".lnk" suffix regardless. Add a comment.
1045 Sun Feb 25 10:18:00 2001 Corinna Vinschen <corinna@vinschen.de>
1047 * shortcut.c (check_shortcut): Change symlink condition.
1049 Fri Feb 23 10:42:00 2001 Corinna Vinschen <corinna@vinschen.de>
1051 * mmap.cc (fhandler_disk_file::mmap): Use `addr' correctly.
1052 * fhandler_mem.cc (fhandler_dev_mem::mmap): Ditto.
1054 Thu Feb 22 17:09:00 2001 Corinna Vinschen <corinna@vinschen.de>
1056 * path.cc (symlink): Keep relative paths relative in the DOS
1057 path inside of a shortcut. If that's impossible or the target
1058 path is already absolute save an absolute path.
1060 Thu Feb 22 15:33:00 2001 Corinna Vinschen <corinna@vinschen.de>
1062 * cygerrno.h: Revert previous patch.
1064 * dir.cc: Eliminate `dir_suffixes'.
1065 (opendir): Remove usage of `dir_suffixes'.
1067 * fhandler.cc (fhandler_disk_file::open): Remove usage of
1069 * path.cc: Rename `inner_suffixes' to `lnk_suffixes'.
1070 (path_conv::check): Remove usage of `inner_suffixes'.
1072 (symlink_info::check): Handle checking for `.lnk' in path_conv
1074 (chdir): Remove usage of `dir_suffixes'.
1075 * shortcut.c: Eliminate debug_printf lines.
1076 (check_shortcut): Don't set error except on failing ReadFile.
1077 * spawn.cc: Remove ".lnk" from `std_suffixes'.
1078 * syscalls.cc (_unlink): Remove usage of `inner_suffixes'.
1079 Remove ".lnk" from `stat_suffixes'.
1080 (_rename): Add check for renaming a symlink to keep the ".lnk"
1081 suffix after renaming.
1083 Thu Feb 22 13:38:00 2001 Corinna Vinschen <corinna@vinschen.de>
1085 * shortcut.c: New file. Provides a C interface to reading of
1086 Windows shortcuts to avoid compiler flag `-fvtable-thunks'.
1087 * shortcut.h: Ditto.
1088 * Makefile.in: Add shortcut.o to DLL_OFILES.
1089 * cygerrno.h: Provide a C interface to `geterrno_from_win_error' for
1090 using in shortcut.c.
1091 * errno.cc (geterrno_from_win_error): Define as extern "C".
1092 * path.cc (struct symlink_info): Remove methods `check_shortcut' and
1094 (shortcut_header): Move to shortcut.c.
1095 (shortcut_initalized): Ditto.
1096 (create_shortcut_header): Ditto.
1097 (cmp_shortcut_header): Ditto.
1098 (symlink_info::check_shortcut): Ditto. Reorganize as a plain C function.
1099 (symlink_info::check_sysfile): Redefine as a global function using the
1100 same parameter list as `check_shortcut' for clearness.
1101 (symlink_info::check): Change parameter list for calls to
1102 `check_shortcut' and `check_sysfile'.
1104 Thu Feb 22 12:04:00 2001 Corinna Vinschen <corinna@vinschen.de>
1106 * fhandler.cc (fhandler_disk_file::open): Use `inner_suffixes' when
1107 resolving real_path.
1108 * path.cc (symlink): Ditto for win32_topath.
1110 Wed Feb 21 22:41:00 2001 Corinna Vinschen <corinna@vinschen.de>
1112 * Makefile.in: Add `-lshell32 -luuid' to link pass for new-cygwin1.dll.
1113 * autoload.cc: Add LoadDLLinitfunc for ole32.dll.
1114 Add LoadDLLfuncEx statements for CoInitialize@4, CoUninitialize@0
1115 and CoCreateInstance@20.
1116 * dir.cc (dir_suffixes): New datastructure.
1117 (readdir): Check for R/O *.lnk files to hide the suffix.
1118 (opendir): Use `dir_suffixes' in path conversion.
1120 * fhandler.cc (fhandler_disk_file::fstat): Add S_IFLNK flag
1121 before calling `get_file_attribute'. Take FILE_ATTRIBUTE_READONLY
1122 into account only if the file is no symlink.
1123 * path.cc (inner_suffixes): New datastructure.
1124 (SYMLINKATTR): Eliminated.
1125 (path_conv::check): Use `inner_suffixes' on inner path components.
1126 (shortcut_header): New global static variable.
1127 (shortcut_initalized): Ditto.
1128 (create_shortcut_header): New function.
1129 (cmp_shortcut_header): Ditto.
1130 (symlink): Create symlinks by creating windows shortcuts. Preserve
1132 (symlink_info::check_shortcut): New method.
1133 (symlink_info::check_sysfile): Ditto.
1134 (symlink_info::check): Check for shortcuts. Move code reading
1135 old system attribute symlinks into symlink_info::check_sysfile().
1136 (chdir): Use `dir_suffixes' in path conversion.
1137 * security.cc (get_file_attribute): Check for S_IFLNK flag.
1138 Force 0777 permissions then.
1139 * spawn.cc (std_suffixes): Add ".lnk" suffix.
1140 * syscalls.cc (_unlink): Use `inner_suffixes' in path conversion.
1141 Check for shortcut symlinks to eliminate R/O attribute before
1142 calling DeleteFile().
1143 (stat_suffixes): Add ".lnk" suffix.
1144 (stat_worker): Force 0777 permissions if file is a symlink.
1146 2001-02-21 Egor Duda <deo@logos-m.ru>
1148 * sigproc.cc (getsem): Make semaphore always non-inheritable.
1150 Mon Feb 19 22:25:53 2001 Christopher Faylor <cgf@cygnus.com>
1152 * dcrt0.cc (locale_init): Remove.
1154 2001-02-15 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
1156 * cygwin.din: Export rand48 functions.
1157 * thread.cc (MTinterface::Init): Remove the initialization of
1159 * dcrt0.cc: Add the initalizer to the declaration of `reent_data'.
1160 * include/cygwin/version.h: Bump CYGWIN_VERSION_API_MINOR to 35.
1162 2001-02-16 Egor Duda <deo@logos-m.ru>
1164 * signal.cc (signal): Prohibit setting handlers for SIGKILL and
1166 * signal.cc (sigaction): Ditto
1167 * syscalls.cc (_lseek): Return EINVAL on invalid input
1169 Wed Feb 14 14:54:40 2001 Christophe Iasci <chrisiasci@aol.com>
1171 * dlfcn.cc (dlopen): Do not call LoadLibrary with a NULL pointer, when
1172 the library is not found
1174 2001-02-14 Egor Duda <deo@logos-m.ru>
1176 * fhandler_console.cc (fhandler_console::char_command): Ignore unknown
1177 rendition codes in \033[xx;yym control sequences
1179 Fri Feb 9 23:19:01 2001 Christopher Faylor <cgf@cygnus.com>
1181 * fork.cc (fork_parent): Return EAGAIN when can't record pid.
1182 * pinfo.h (pinfo::remember): Return value of call to proc_subproc.
1183 * sigproc.cc (proc_subproc): Return error if can't record pid.
1185 Fri Feb 9 12:17:27 2001 Christopher Faylor <cgf@cygnus.com>
1187 * syscalls.cc (mknod): Add valid parameters.
1189 Thu Feb 8 22:09:00 2001 Corinna Vinschen <corinna@vinschen.de>
1191 * mmap.cc (mmap): Check for reusing a mapping only on MAP_SHARED
1192 and on MAP_PRIVATE|MAP_ANON in the special case of offset 0.
1194 Thu Feb 8 21:57:00 2001 Corinna Vinschen <corinna@vinschen.de>
1196 * mmap.cc (class list): Add member `hash'.
1197 (list::list): Initialize `hash'.
1198 (list::get_list_by_fd): Use filepath hash value to get the correct
1199 mapping list if it's not an anonymous mapping.
1200 (map::add_list): Initialize `hash' with filepath hash value.
1201 (mmap): Check for reusing a mapping only on MAP_SHARED.
1203 Wed Feb 7 18:47:36 2001 Christopher Faylor <cgf@cygnus.com>
1205 * signal.cc (killpg): Correct first argument.
1207 Wed Feb 7 22:22:00 2001 Corinna Vinschen <corinna@vinschen.de>
1209 * autoload.cc: Add LoadDLLinitfunc for iphlpapi.dll.
1210 Add LoadDLLfuncEx statements for GetIfTable@12 and GetIpAddrTable@12.
1211 * fhandler_socket.cc (fhandler_socket::ioctl): Move variable
1212 definitions to the beginning of the function to allow better debugging.
1213 Add handling for SIOCGIFHWADDR, SIOCGIFMETRIC and SIOCGIFMTU.
1214 * net.cc: Include iphlpapi.h.
1215 (get_2k_ifconf): Rewritten. Uses IP Helper API now.
1216 (get_nt_ifconf): Add handling for SIOCGIFHWADDR, SIOCGIFMETRIC
1218 (get_95_ifconf): Ditto. Renamed from `get_9x_ifconf'.
1219 (get_ifconf): Name loopback `lo' instead of `lo0' as in Linux.
1220 Add handling for SIOCGIFHWADDR, SIOCGIFMETRIC and SIOCGIFMTU.
1221 Call `get_95_ifconf' only on Windows 95, `get_nt_ifconf' only
1222 on Windows NT < Service Pack 3, `get_2k_ifconf otherwise.
1223 * include/asm/socket.h: Add defines for SIOCGIFHWADDR, SIOCGIFMETRIC
1225 * include/cygwin/if.h: Add `ifr_hwaddr', `ifr_metric' and `ifr_mtu'.
1226 (struct ifreq): Add `ifru_hwaddr'.
1228 Tue Feb 6 15:04:00 2001 Corinna Vinschen <corinna@vinschen.de>
1230 * syscalls.cc (stat_worker): Add a check for the special case when
1231 a process creates a file using mode 000 using ntsec.
1233 Mon Feb 5 17:00:00 2001 Corinna Vinschen <corinna@vinschen.de>
1235 * fhandler.cc (fhandler_base::open): Always add GENERIC_READ access
1236 when opening raw disk devices.
1237 * fhandler_floppy.cc (fhandler_dev_floppy::lseek): Implement bytewise
1239 * fhandler_raw.cc (fhandler_dev_raw::open): Always open raw disk device
1241 (fhandler_dev_raw::raw_write): Don't drop read buffer content when
1244 Mon Feb 5 13:30:00 2001 Corinna Vinschen <corinna@vinschen.de>
1246 * mmap.cc (mmap_record::fixup_map): New method to duplicate
1247 the memory protection in a just forked child.
1248 (mmap): Realign gran_len to page boundary only on anonymous
1249 mapping before saving in the mmap_record.
1250 (munmap): Cleanup code.
1252 (fixup_mmaps_after_fork): Ditto. Call mmap_record::fixup_map now.
1254 Thu Feb 1 23:08:29 2001 Christopher Faylor <cgf@cygnus.com>
1256 * cygheap.cc (creturn): Correctly calculate cygheap_max.
1258 Wed Jan 31 10:04:58 2001 Christopher Faylor <cgf@cygnus.com>
1260 * shared.cc (shared_info::initialize): Reduce size of heap.
1262 Wed Jan 31 13:22:00 2001 Corinna Vinschen <corinna@vinschen.de>
1264 * include/sys/resource.h: Fix typo.
1266 Wed Jan 31 13:20:00 2001 Corinna Vinschen <corinna@vinschen.de>
1268 * include/sys/resource.h: Add RLIMIT_NLIMITS and RLIM_NLIMITS.
1270 Tue Jan 30 18:15:23 2001 Christopher Faylor <cgf@cygnus.com>
1272 * include/cygwin/version.h: Bump version to 1.3.0.
1274 Tue Jan 30 8:55:00 2001 Corinna Vinschen <corinna@vinschen.de>
1276 * pinfo.cc (pinfo::init): Use INVALID_HANDLE_VALUE instead of
1277 explicit cast (HANDLE) 0xffffffff.
1278 * shared.cc (open_shared): Ditto.
1280 Mon Jan 29 17:15:22 2001 Bill Hegardt <bill@troyxcd.com>
1282 * fhandler_serial.cc (raw_write): Use local copy of OVERLAPPED
1283 structure instead of shared structure to fix a race condition between
1286 Mon Jan 29 14:30:00 2001 Corinna Vinschen <corinna@vinschen.de>
1288 * mmap.cc (mmap): Remove obsolete check for MAP_SHARED|MAP_ANON as
1291 Mon Jan 29 10:23:00 2001 Corinna Vinschen <corinna@vinschen.de>
1293 * mmap.cc (mmap_record::find_empty): Fix loop condition.
1295 Sun Jan 28 19:40:40 2001 Christopher Faylor <cgf@cygnus.com>
1297 * syscalls.cc (_link): Make sure that newpath does not exist. Set
1300 Sun Jan 28 19:29:08 2001 Christopher Faylor <cgf@cygnus.com>
1302 * cygheap.cc (init_cheap): Don't specify a load address for the heap.
1303 It doesn't work on #!*& Windows 9x.
1304 (cygheap_init): Move GetUserName to memory_init.
1305 * dcrt0.cc (dll_crt0_1): Call new memory_init functin, eliminate call
1307 * heap.cc (heap_init): Improve error output.
1308 * heap.h: Correct some declarations.
1309 * shared.cc (mount_table_init): Remove.
1310 (memory_init): Renamed from shared_init. Reorganize to accomodate
1311 strange Windows 9x problems with cygheap/heap interaction.
1312 * shared_info.h: Rename shared_init to memory_init.
1314 Sun Jan 28 01:25:33 2001 Christopher Faylor <cgf@cygnus.com>
1316 * include/cygwin/version.h: Bump API version.
1318 Sun Jan 28 01:18:22 2001 Christopher Faylor <cgf@cygnus.com>
1320 * cygheap.cc (init_cheap): Move username initialization.
1321 (cygheap_init): Here.
1322 * shared_info.h (mount_info): Add a sys_mount_table_counter field.
1323 (shared_info): Ditto.
1324 * path.cc (mount_info::conv_to_win32_path): Check that our mount table
1325 is in sync with the system mount table and reinitialize it if not.
1326 (mount_info::add_reg_mount): Bump sys_mount_table counters if the
1327 system mount table changes.
1328 (mount_info::del_reg_mount): Ditto.
1329 (mount_info::write_cygdrive_info_to_registry): Ditto.
1330 (mount_info::remove_cygdrive_info_from_registry): Ditto.
1332 Sun Jan 28 00:28:30 2001 Christopher Faylor <cgf@cygnus.com>
1334 Throughout, change 'cygwin_shared.mount' to 'mount_table'.
1335 * child_info.h (child_info): Move shared_h, console_h to cygheap. Add
1337 * cygheap.h (init_cygheap): Add shared_h, console_h.
1338 * cygheap.cc (init_cheap): Initialize heap at a fixed location after
1339 the shared memory regions. Initialize cygheap->user name here.
1340 * dcrt0.cc (dll_crt0_1): Call getpagesize () to initialize constants.
1341 Remove cygheap_init since it is done in shared_init now.
1342 (_dll_crt0): Initialize mount_h, remove shared_h and console_h
1344 * fhandler_console.cc (console_shared_h): Eliminate.
1345 (get_tty_stuff): Use cygheap->console_h rather than console_shared_h.
1346 * heap.cc (heap_init): Use page size constant calculated earlier in
1348 * shared.cc: Eliminate cygwin_shared_h. Add cygwin_mount_h.
1349 (mount_table_init): New function for initializing a user mount table.
1350 (open_shared_file_map): Use constant for shared memory region.
1351 Initialize cygheap and mount table here.
1352 (open_shared): Improve debugging output.
1353 (shared_info::initialize): Eliminate call to mount.init.
1354 (shared_terminate): Use cygheap->shared_h. Close cygwin_mount_h.
1355 (open_shared_file_map): Eliminate.
1356 * shared_info.h (mount_info): Add a version field.
1357 (shared_align_past): New macro for calculating location for shared
1359 * sigproc.cc (init_child_info): Eliminate shared_h, console_h.
1360 * spawn.cc (spawn_guts): Pass on cygwin_mount_h iff not a different
1362 * syscalls.cc (system_info): New global holding system memory defaults.
1363 (getpagesize): Use system_info.
1364 * uinfo.cc (internal_getlogin): Only fill in user name if nonexistent.
1365 * winsup.h: Declare system_info.
1367 * passwd.cc (read_etc_passwd): Use cygheap->user.name () rather than
1368 retrieving the name again.
1370 Sat Jan 27 10:18:02 2001 Christopher Faylor <cgf@cygnus.com>
1372 * path.cc (path_conv::check): Detect when path has symlinks.
1373 (symlink_info::check): Remove debugging stuff.
1374 (chdir): Use posix'ized win32 path if cd'ed to a path using symlinks.
1376 Fri Jan 26 21:20:28 2001 Christopher Faylor <cgf@cygnus.com>
1378 * exceptions.cc (sigreturn): Call any pending signals prior to
1379 resetting the signal mask so that stacked signals behave correctly.
1380 (sigdelayed): Avoid a race where a signal could end up calling an
1381 incorrect signal handler if two signals come in close together.
1383 Tue Jan 23 21:56:00 2001 Corinna Vinschen <corinna@vinschen.de>
1385 * mmap.cc (fhandler_disk_file::mmap): Call CreateFileMapping with
1386 len != 0 only when performing an anonymous mapping.
1388 Mon Jan 22 15:35:28 2001 Christopher Faylor <cgf@cygnus.com>
1390 * path.h: Add a new constant.
1391 * syscalls.cc (_read): Oscillate errno check.
1393 Mon Jan 22 15:27:12 2001 Christopher Faylor <cgf@cygnus.com>
1395 * include/cygwin/version.h: Bump API to reflect setlogmask.
1397 Sun Jan 21 22:40:25 2001 Jason Tishler <jt@dothill.com>
1399 * cygwin.din: Add export for setlogmask().
1400 * syslog.cc (setlogmask): New function.
1402 Thu Jan 18 10:27:00 2001 Corinna Vinschen <corinna@vinschen.de>
1404 * resource.cc (setrlimit): Support RLIMIT_NOFILE.
1406 Wed Jan 17 23:23:12 2001 Christopher Faylor <cgf@cygnus.com>
1408 * syscalls.cc (setdtablesize): Call with amount to increment not total
1409 amount. Return success or failure error code.
1411 Wed Jan 17 09:47:13 2001 Christopher Faylor <cgf@cygnus.com>
1413 * autoload.cc (LoadDLLinitfunc): Remove debugging statement.
1415 * exceptions.cc (sig_handle_tty_stop): Move setting of PID_STOPPED to
1416 earlier in interrupt.
1417 ((interrupt_setup): i.e., here.
1418 (sig_handle): Don't queue multiple SIGSTOPS.
1419 * fhandler.h (bg_check_types): Enumerate return value of bg_check for
1421 * signal.cc (kill_pgrp): Minor cleanup.
1422 * fhandler_termios.cc (fhandler_termios::bg_check): Use enumerated type
1423 for function return. Don't raise signal if a signal is already queued.
1424 * fhandler_console.cc (fhandler_console::read): Use enumerated return
1426 * select.cc: Ditto, throughout.
1427 * read.cc: Ditto, throughout.
1428 * termios.cc: Ditto, throughout.
1429 (_read): YA interrupt detect simplification.
1430 * wait.cc (wait4): Ditto.
1432 Wed Jan 17 10:56:00 2001 Corinna Vinschen <corinna@vinschen.de>
1434 * cygheap.cc (cygheap_user::~cygheap_user): Temporarily
1435 disable free'ing memory.
1437 Tue Jan 16 18:01:00 2001 Corinna Vinschen <corinna@vinschen.de>
1439 * mmap.cc (mmap): Initialize fh to avoid compiler warnings.
1441 Mon Jan 15 21:07:00 2001 Christopher Faylor <cgf@cygnus.com>
1443 * wait.cc (wait4): Rename variable for consistency. Allow restartable
1446 Mon Jan 15 23:15:00 2001 Corinna Vinschen <corinna@vinschen.de>
1448 * mmap.cc (mmap): Add more parameter checking. Change error output
1449 in case of EINVAL. Treat mmapping /dev/zero like MAP_ANONYMOUS.
1451 Mon Jan 15 20:34:00 2001 Corinna Vinschen <corinna@vinschen.de>
1453 * mmap.cc: include <unistd.h>. Define some bit operations for
1455 (mmap_record): Change type of base_address_ to caddr_t.
1456 Add map_map_ member. Add several methods to manipulate map_map_.
1457 (mmap_record::alloc_map): New method.
1458 (mmap_record::free_map): Ditto.
1459 (mmap_record::find_empty): Ditto.
1460 (mmap_record::map_map): Ditto.
1461 (mmap_record::unmap_map): Ditto.
1462 (list::add_record): Change return type to `mmap_record *'.
1464 (list::match): New method.
1465 (mmap): Partly rewritten to take care for the new page map. Add some
1469 Mon Jan 15 13:50:00 2001 Corinna Vinschen <corinna@vinschen.de>
1471 * heap.cc (heap_init): Fix extern declaration of getpagesize.
1472 * syscalls.cc (getpagesize): Fix another typo.
1474 Mon Jan 15 12:48:00 2001 Corinna Vinschen <corinna@vinschen.de>
1476 * syscalls.cc (getpagesize): Save pagesize in global variable to
1477 avoid calling GetSystemInfo too often.
1478 * heap.cc (getpagesize): Eliminate.
1479 (heap_init): Use getpagesize function from syscalls.cc.
1481 Mon Jan 15 11:56:00 2001 Corinna Vinschen <corinna@vinschen.de>
1483 * sysconf.cc (sysconf): return `getpagesize ()' on _SC_PAGESIZE
1484 request to avoid implementing the same twice.
1486 Sun Jan 14 14:07:50 2001 Christopher Faylor <cgf@cygnus.com>
1488 * syscalls.cc (_read): Use more lightweight method for determining if
1489 read has been interrupted by a signal.
1491 Fri Jan 12 00:35:15 2001 Christopher Faylor <cgf@cygnus.com>
1493 * debug.h: Add regparm attributes to some functions.
1495 * signal.cc (sigaction): Don't treat SIGCONT specially.
1497 * exceptions.cc (interrupt_setup): Save sa_flags of interrupted signal
1499 (sig_handler): Default any stopping signal to SIGSTOP.
1500 (call_signal_handler): New function.
1501 (sigdelayed0): New function.
1502 * sigproc.cc (sigproc_init): Initialize SIGSTOP sigaction for special
1504 * sigproc.h: Define call_signal_handler.
1505 * syscalls.cc (_read): Allow restartable signal behavior.
1507 Thu Jan 11 13:17:00 2001 Corinna Vinschen <corinna@vinschen.de>
1509 * fhandler.h (fhandler_base): New method `fixup_mmap_after_fork'.
1510 (fhandler_disk_file: Ditto.
1511 (fhandler_dev_mem): Ditto.
1512 * fhandler_mem.cc (fhandler_dev_mem::open): Set OBJ_INHERIT attribute
1513 for device\physicalmemory handle.
1514 (fhandler_dev_mem::mmap): Ditto.
1515 * fhandler_mem.cc (fhandler_dev_mem::fixup_mmap_after_fork): New
1517 * mmap.cc (mmap_record): Add private `fdesc_' member. Change
1518 constructor accordingly.
1519 (get_fd): New method.
1520 (mmap): Use new mmap_record constructor.
1521 (fhandler_base::fixup_mmap_after_fork): New method.
1522 (fhandler_disk_file::fixup_mmap_after_fork): Ditto.
1523 (fixup_mmaps_after_fork): Call `fixup_mmap_after_fork' of appropriate
1526 Wed Jan 10 22:08:30 2001 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
1528 * sigproc.cc (wait_sig): Allow SIGCONT when stopped.
1530 Tue Jan 9 16:55:00 2001 Corinna Vinschen <corinna@vinschen.de>
1532 Patch suggested by René Møller Fonseca <fonseca@mip.sdu.dk>
1533 * include/sys/socket.h: Change prototype to have 2nd parameter `const'.
1534 * net.cc (cygwin_bind): Change 2nd parameter to `const'.
1536 Sun Jan 7 22:59:37 2001 Christopher Faylor <cgf@cygnus.com>
1538 * pinfo.cc (codepage_init): Move function.
1539 * environ.cc (codepage_init): To here.
1540 * exceptoins.cc (SIG_NONMASKABLE): Remove SIGCONT from consideration
1541 since it is supposed to be maskable.
1542 * signal.cc (sigaction): Ditto.
1543 * sigproc.cc (wait_sig): Ditto.
1544 * winsup.h: Eliminate global declaration of codepage_init.
1546 Thu Jan 5 9:33:00 2001 Corinna Vinschen <corinna@vinschen.de>
1548 * resource.cc (getrlimit): Set errno on EFAULT instead of returning
1552 Thu Jan 5 3:38:00 2001 David Sainty <David.Sainty@optimation.co.nz>
1554 * resource.cc (setrlimit): Prevent failing with an error when the
1555 operation would not have changed anything.
1557 Thu Jan 4 10:29:54 2001 Earnie Boyd <earnie_boyd@yahoo.com>
1559 * thread.cc: Need LONG_MAX definition.
1561 Wed Jan 3 13:47:23 2001 Christopher Faylor <cgf@cygnus.com>
1563 * thread.cc (MTinterface::CreateSemaphore): Correctly set semaphore
1566 Wed Jan 3 09:44:51 2001 Christopher Faylor <cgf@cygnus.com>
1568 * fhandler_console.cc (fhandler_console::read): Restore missing test
1569 for code page before doing OemToCharBuff.
1571 Wed Jan 3 09:20:20 2001 Jason Tishler <jt@dothill.com>
1573 * include/cygwin/version.h: Fix typo in CYGWIN_VERSION_DLL_COMBINED