Christopher Faylor
9cf9c14668
* fhandler.h (fhandler_base::clear_r_binary): New method.
...
(fhandler_base::clear_w_binary): New method.
* syscalls.cc (setmode): Accept 0 as mode value. Resets text/binary behavior
for fd to default.
2001-04-23 17:29:33 +00:00
Christopher Faylor
ca608f5682
* include/winsock.h: Protect some more newlib defines when compiling cygwin.
2001-04-23 17:19:24 +00:00
Christopher Faylor
f940c5b1aa
* net.cc [errmap]: Add '0' condition.
...
(find_winsock_errno): Don't translate no error to EPERM.
2001-04-23 16:46:30 +00:00
Christopher Faylor
3c76c0760f
spacing changes.
2001-04-23 02:56:19 +00:00
Christopher Faylor
c02e9189cf
* include/cygwin/version.h: Bump Cygwin version and API version.
2001-04-23 00:48:23 +00:00
Robert Collins
9672024b82
Mon Apr 23 9:27:00 2001 Robert Collins <rbtcollins@hotmail.com>
...
* thread.cc (MTinterface::Init): Always initialise per process variables.
2001-04-22 23:59:15 +00:00
Christopher Faylor
1acf5c29c8
* features.h: Reinstate as wrapper for sys/features.h.
2001-04-22 23:18:28 +00:00
Corinna Vinschen
b265245256
* security.cc (alloc_sd): Reformat comment.
...
* shared.cc: Drop function declarations already in security.h.
2001-04-22 22:12:12 +00:00
Christopher Faylor
96dc5dd7e5
* shortcut.c (check_shortcut): Close input file handle before returning.
...
* path.cc (check_sysfile): Ditto.
(symlink_info::check): Rely on opened file handle being closed by symlink
checking routines. Set ext_tacked_on when .lnk is detected.
2001-04-22 16:19:27 +00:00
Christopher Faylor
da77d416c5
* thread.cc (MTinterface::Init): Remove accidentally checked in code.
2001-04-21 23:26:14 +00:00
Robert Collins
9450ad0d02
Sun Apr 22 20:22:00 2001 Robert Collins <rbtcollins@hotmail.com>
...
* passwd.cc (getpwuid): Check for thread cancellation.
(getpwuid_r): Ditto.
(getpwname): Ditto.
(getpwnam_r): Ditto.
* thread.h (pthread_mutex): New constructors for pshared operation.
(MTinterface): Associative array for pshared mutex's.
* thread.cc (MTinterface::Init): Initailize pshared mutex array.
(pthread_cond::BroadCast): Implementation notes.
(pthread_cond::TimedWait): Remove use of SignalObjectAndWait on non-NT systems.
(pthread_mutex::pthread_mutex(unsigned short)): New function.
(pthread_mutex::pthread_mutex (pthread_mutex_t *, pthread_mutexattr *)):New function.
(pthread_mutex::pthread_mutex(pthread_mutexattr *)): Fail on pshared mutex's.
(__pthread_mutex_getpshared): New function.
(__pthread_join): Check for thread cancellation.
(__pthread_cond_timedwait): Support pshared mutex's.
(__pthread_cond_wait): Ditto.
(__pthread_condattr_setpshared): Error on PROCESS_SHARED requests.
(__pthread_mutex_init): Support pshared mutex's.
(__pthread_mutex_getprioceiling): Ditto.
(__pthread_mutex_lock): Ditto.
(__pthread_mutex_trylock): Ditto.
(__pthread_mutex_unlock): Ditto.
(__pthread_mutex_destroy): Ditto.
(__pthread_mutex_setprioceiling): Ditto.
(__pthread_mutexattr_setpshared): Support PTHREAD_PROCESS_PSHARED requests.
2001-04-21 14:23:47 +00:00
Christopher Faylor
603260769e
* cygwin.din: Add *scanf and *scan_r functions.
2001-04-20 23:38:43 +00:00
Corinna Vinschen
3c8e92d9fc
* security.cc (set_process_privileges): Swap out.
...
* sec_helper.cc (set_process_privilege): Rename from
`set_process_privileges'. Takes the privilege to enable or disable
as parameter now.
* security.h: Add prototype for `set_process_privileges'.
2001-04-20 20:36:13 +00:00
Christopher Faylor
b9815dc3dc
* path.cc (path_conv::check): Always initialize member variables.
2001-04-20 16:40:04 +00:00
Christopher Faylor
cbd8868713
* include/sys/file.h: More cleanup for X_OK.
2001-04-20 16:36:17 +00:00
Christopher Faylor
cdcfe4e8e9
* include/sys/file.h: Move X_OK protection earlier.
...
* dtable.cc (dtable::vfork_child_fixup): Avoid closing already closed handles.
2001-04-20 15:50:03 +00:00
Corinna Vinschen
bfbc1aecdc
* grp.cc (getgroups): Change so that SIDs get compared instead
...
of strings to SIDs.
2001-04-20 14:30:22 +00:00
Corinna Vinschen
c0d1968a18
* Makefile.in: Add object files sec_helper.cc' and
sec_acl.cc'.
...
* security.cc: Swap out several functions.
* sec_acl.cc: New file. Move Sun compatibel ACL functions from
`security.cc' to here.
* sec_helper.cc: New file. Move security helper functions from
`security.cc' to here.
* security.h: Changed to accomodate the above changes.
* grp.cc: Replace `group_in_memory_p' by `group_state'.
Eliminate group_sem throughout.
(enum grp_state): New enumeration type.
(read_etc_group): Make race safe.
* security.cc: Eliminate group_sem throughout.
2001-04-20 13:02:32 +00:00
Egor Duda
3ee14d6850
* dumper.cc (dumper::init_core_dump): Set architecture field in dump
...
header.
2001-04-19 14:22:30 +00:00
Corinna Vinschen
e8cec9646e
* winsup.api/mmaptest02.c: New test.
...
* winsup.api/mmaptest03.c: Ditto.
* winsup.api/mmaptest04.c: Ditto.
2001-04-19 09:16:40 +00:00
Corinna Vinschen
b78d6f6e7b
* mmap.cc (mmap): Drop usage of the same memory area if the same
...
region of the same file is mapped twice.
2001-04-19 07:44:34 +00:00
Christopher Faylor
a9467b6835
* Makefile.in: Add -U_WIN32 to CFLAGS compile line to avoid inappropriate
...
Windows-isms.
2001-04-19 03:55:02 +00:00
Christopher Faylor
f8415f617b
* configure.in: Add bz2lib.
2001-04-18 22:45:27 +00:00
Christopher Faylor
0381fec68f
Throughout, change fdtab references to cygheap->fdtab.
...
* child_info.h (cygheap_exec_info): Eliminate special fdtab stuff.
* spawn.cc (spawn_guts): Ditto.
* cygheap.cc (cygheap_init): Initialize fdtab, if appropriate.
* cygheap.h (CYGHEAPSIZE): Include size of init_cygheap.
(_cmalloc_entry): Include fdtab here.
* dtable.h (dtable): Declare/define new methods.
* dtable.cc (dtable::vfork_child_fixup): New method.
(dtable::fixup_after_exec): Remove unneeded extra arguments.
* dcrt0.cc (dll_crt0_1): Ditto.
* environ.cc (getwinenv): Use case sensitive comparison.
(winenv): Make a copy of environment cache to avoid realloc problems when
duplicate environment variables exist in the environment. (From Egor Duda)
* net.cc (cygwin_socket): Revert Apr 14 change.
* include/sys/file.h: Protect against previous X_OK definition.
* passwd.cc: Eliminate passwd_sem throughout.
* security.cc: Ditto.
* cygwin.din: Export New functions.
* passwd.cc (read_etc_passwd): Make race safe.
(getpwuid_r): New function.
(getpwnam_r): New function.
2001-04-18 21:10:15 +00:00
Christopher Faylor
a2d47fe9d9
*** empty log message ***
2001-04-18 20:00:34 +00:00
Corinna Vinschen
77c45b121e
* grp.cc (getgroups): Avoid crash if passwd field if /etc/group is
...
empty.
2001-04-18 14:52:07 +00:00
Christopher Faylor
4199e1e6fb
* path.h (path_conv::add_ext_from_sym): Declare.
...
* path.cc (path_conv::add_ext_from_sym): Convert to pure inline method.
2001-04-17 23:12:11 +00:00
Corinna Vinschen
e6629a8ad0
* path.cc (windows_device_names): Add missing NULL element.
2001-04-17 16:52:09 +00:00
Christopher Faylor
adfd477da3
* path.cc (windows_device_names): Move dsp to proper location.
2001-04-17 16:16:27 +00:00
Earnie Boyd
91874e20bf
* include/windows.h: Define _ANONYMOUS_STRUCT and _ANONYMOUS_UNION
...
as __extenstion__ when appropriate.
* include/mmsystem.h: Mark anonymous structs and unions as
__extension__ to prevent compiler warning when invoked with
-pedantic
* include/oaidl.h: Ditto.
* include/objidl.h: Ditto.
* include/olectl.h: Ditto.
* include/prsht.h: Ditto.
* include/shlobj.h: Ditto.
* include/winbase.h: Ditto.
* include/winnt.h: Ditto.
* include/wtypes.h: Ditto.
2001-04-17 12:58:06 +00:00
Corinna Vinschen
8aefe7c08b
Forgot the ChangeLog...
2001-04-17 11:49:19 +00:00
Corinna Vinschen
0f56512627
* path.cc (path_conv::check): Set case_clash even if pcheck_case
...
is set to PCHECK_ADJUST when a case clash is given for the last
component in path.
(symlink_info::case_check): Ditto.
* syscalls.cc (_rename): Avoid overwriting an already existing file
if a case clash is given even if pcheck_case is set to PCHECK_ADJUST.
2001-04-17 11:47:37 +00:00
Corinna Vinschen
77eb506d60
Add missing ChangeLog entry.
2001-04-17 08:51:34 +00:00
Christopher Faylor
7b79ebc5e9
Turn NEWVFORK off.
2001-04-17 06:07:07 +00:00
Christopher Faylor
431ba7dd33
* path.h (cwdstuff): Move class.
...
* cygheap.h (cwdstuff): To here.
(init_cygheap): Add cwd field.
* child_info.h (cygheap_exec_info): Eliminate cwd stuff.
(child_info_spawn): Ditto.
* dcrt0.cc (dll_crt0_1): Remove cygcwd.fixup_after_exec call. Convert cygcwd
reference to cygheap->cwd.
* path.cc: Ditto, throughout.
(cwdstuff::copy): Eliminate.
(cwdstuff::fixup_after_exec): Ditto.
* spawn.cc (spawn_guts): Eliminate call to cygcwd.copy.
* fhandler.h (FH_OSS_DSP): Move into "fast" device category.
2001-04-17 03:52:08 +00:00
Corinna Vinschen
7ade56ca6a
* mmap.cc: Move fh_paging_file from some functions to be
...
a global static variable.
(class mmap_record): Add `devtype_' member to remember
the device type of the file. Add declaration for methods
`get_device', `alloc_fh' and `free_fh'.
(mmap_record::mmap_record): Initialize `devtype_' correctly.
(mmap_record::alloc_fh): New method.
(mmap_record::free_fh): Ditto.
(munmap): Use new mmap_record::alloc_fh and mmap_record::free_fh
methods to create a correct fhandler.
(msync): Ditto.
(fixup_mmaps_after_fork): Ditto.
2001-04-16 17:26:04 +00:00
Corinna Vinschen
c4548fb4fa
* grp.cc (getgroups): If `allow_ntsec' is set, use the process token
...
information to evaluate the groups list.
2001-04-16 14:02:42 +00:00
Corinna Vinschen
8a3adc99ec
* mkgroup.c: Add function pointers `netlocalgroupgetmembers' and
...
`netgroupgetusers'.
(load_netapi): Load function pointers `netlocalgroupgetmembers'
and `netgroupgetusers'.
(enum_local_users): New function.
(enum_local_groups): Call `enum_local_users' for each group if
`print_users' is set.
(enum_users): New function.
(enum_groups): Call `enum_users' for each group if `print_users' is set.
(usage): Add usage text for `-u/--users'.
(longopts): Add option `--users'.
(opts): Add option character `u'.
(main): Set `print_users' according to option `-u/--users'.
Call `enum_local_groups' and `enum_groups' with additional parameter
`print_users'.
2001-04-16 13:19:27 +00:00
Christopher Faylor
3b3b19d258
* features.h: Remove this file as it is now being supplied by newlib.
2001-04-16 04:08:05 +00:00
Christopher Faylor
b0a50cf34c
* autoload.cc: Add winmm functions needed by fhandler_dsp.cc.
...
* fhandler_dsp.cc: New file. Implements OSS like /dev/dsp.
* include/sys/soundcard.h: New file. User land includes for OSS /dev/dsp.
* fhandler.h: Add new class fhandler_dev_dsp and a FH_OSS_DSP definition.
* dtable.cc (dtable::build_fhandler): Allow creation of the /dev/dsp device.
* path.cc (windows_device_names): Add /dev/dsp into list of device names.
* Makefile.in (DLL_OFILES): Add fhandler_dsp.o.
2001-04-16 03:27:16 +00:00
Christopher Faylor
9f42525632
* mount.cc (longopts): Add help to options list.
...
(opts): Add 'h' to options string.
* umount.cc (longopts): Add help to options list.
(opts): Add 'h' to options string and change 'R' to 'A'.
2001-04-16 02:51:03 +00:00
Christopher Faylor
4535e6a9aa
* uname.c (uname): Default n in in86 to 6 if Windows returns > 6.
2001-04-15 20:39:46 +00:00
Corinna Vinschen
9f2cad57a6
Patch by Kazuhiro Fujieda <fujieda@jaist.ac.jp>:
...
* mkgroup.c (enum_groups): Use RID + offset specified an additional
argument as ID.
(usage): Add description of -o option.
(longopts, opts): Add specifications of -o/--id-offset option.
(main): Add -o option. Invoke enum_groups with specified offset.
* mkpasswd.c (enum_users): Just like mkgroup.c.
(usage, longopts, opts): Ditto.
(main): Add -o option. Invoke enum_users with specified offset
only against domain accounts.
2001-04-15 14:09:33 +00:00
Corinna Vinschen
1ff87985a1
* path.cc (add_ext_from_sym): Redefine to call `add_ext_from_sym_'.
...
(add_ext_from_sym_): New inline function.
2001-04-15 14:00:45 +00:00
Christopher Faylor
34bbe838e6
* config.h.in: Turn on VFORK by default.
2001-04-14 23:24:07 +00:00
Christopher Faylor
266be1d8c9
* net.cc (cygwin_socket): Set SO_LINGER to small value so closed UNIX domain
...
sockets will not stay around.
* select.cc (socket_cleanup): Set SO_LINGER to small value so closed dummy
sockets do not stay around. Use correct value for second argument to shutdown.
2001-04-14 22:11:03 +00:00
Robert Collins
e6b98fc8d6
Sat Apr 14 17:04:00 2001 Robert Collins <rbtcollins@hotmail.com>
...
* thread.h (MTinterface): Add threadcount.
* thread.cc (MTinterface::Init): Set threadcount to 1.
(__pthread_create): Increment threadcount.
(__pthread_exit): Decrement threadcount and call exit() from the last thread.
2001-04-14 07:06:02 +00:00
Christopher Faylor
1114d47268
Fix ChangeLog format.
2001-04-13 15:34:33 +00:00
Christopher Faylor
39b6859a28
* fork.cc (fork_child): Call the __pthread_atforkchild function.
...
(fork_parent): Call the __pthread_atforkparent function.
* cygwin.din: Export pthread_atfork.
* thread.h (callback): New class.
(MTinterface): Use it.
* thread.cc (__pthread_atforkprepare): New function.
(__pthread_atforkparent): New function.
(__pthread_atforkchild): New function.
(__pthread_atfork): New function.
* pthread.cc (pthread_atfork): New function.
2001-04-13 15:28:20 +00:00
Corinna Vinschen
e61cead397
* path.cc (add_ext_from_sym): New define evaluating `known'suffix'.
...
(path_conv::check): Use add_ext_from_sym throughout.
2001-04-13 07:54:20 +00:00