aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin
AgeCommit message (Collapse)AuthorFilesLines
2004-05-25* winbase.h: Semi-revert previous patch as it caused strange behavior. UseChristopher Faylor3-5/+10
syntax similar to that recommended in mingw-dvlpr.
2004-05-25* include/cygwin/version.h: Bump DLL minor number to 11.Christopher Faylor2-1/+5
2004-05-25* winbase.h: Add proper attributions for memory operands throughout.Christopher Faylor2-6/+10
2004-05-25* include/cygwin/version.h: Bump api minor version number.Christopher Faylor4-3/+13
* cygwin.din: Export atoll.
2004-05-20* tty.cc (tty_list::allocate_tty): Leave tty_mutex armed on successful returnChristopher Faylor3-3/+17
from !with_console * fhandler_tty.cc (fhandler_pty_master::open): Release tty_mutex here after all initialization is done.
2004-05-17 * grp.cc (getgrgid_r): Replace struct group by struct __group32 inCorinna Vinschen2-4/+10
argument definition. (getgrnam_r): Ditto.
2004-05-17 * cygwin.din: Add symbols flockfile, ftrylockfile, funlockfile,Corinna Vinschen11-3/+170
getgrgid_r, getgrnam_r and getlogin_r. * grp.cc (getgrgid_r): New function. (getgrnam_r): Ditto. * syscalls.cc (flockfile): Ditto. (ftrylockfile): Ditto. (funlockfile): Ditto. * sysconf.cc (sysconf): Return LOGIN_NAME_MAX in case of _SC_LOGIN_NAME_MAX. * thread.cc (__cygwin_lock_trylock): Define int. Return value from call to pthread_mutex_trylock. * uinfo.cc (getlogin_r): New function. * include/limits.h: Define LOGIN_NAME_MAX. * include/cygwin/version.h: Bump API minor number. * include/sys/lock.h: Add declarations for __cygwin_lock_xxx functions. * include/sys/stdio.h: Add define for _ftrylockfile.
2004-05-17* tty.cc (tty_list::init): Move hmaster initialization earlier to preventChristopher Faylor2-1/+6
compilation error.
2004-05-17Change the name "title_mutex" to "tty_mutex" throughout.Christopher Faylor7-42/+50
* tty.h (tty_list::allocate_tty): Turn argument into a boolean. * tty.cc (tty_list::init): Protect entire allocation operation with tty_mutex (formerly title_mutex) to protect against allocation races.
2004-05-16add missing fileChristopher Faylor1-0/+32
2004-05-16 * fhandler_socket.cc (fhandler_socket::recvfrom): Use original flagsCorinna Vinschen2-12/+15
value in each WSARecvFrom call. (fhandler_socket::recvmsg): Ditto. Reformat slightly.
2004-05-16* cygthread.cc (cygthread::is): Eliminate.Christopher Faylor9-105/+153
* cygthread.h (cygthread::is): Eliminate declaratin. * fhandler_console.cc (fhandler_console::read): Only wait for signal_arrived in the main thread. * fhandler_socket.cc: Include new "wininfo.h". (fhandler_socket::ioctl): Use 'winmsg' rather than 'gethwnd()'. * sync.cc (muto::grab): Define new function. (muto::acquire): Use tls pointer rather than tid. (muto::acquired): Ditto. (muto::reset): Delete. (muto::release): Ditto. Also implement "close on last release". * sync.h (muto::tid): Delete. (muto::tls): New field. (muto::ismine): Delete. (muto::owner): Delete. (muto::unstable): Delete. (muto::reset): Delete. (muto::upforgrabs): New method. (muto::grab): Ditto. (new_muto_name): New define. * wininfo.h: New file. (wininfo): New class. * window.cc: Rework throughout to use winfo class for controlling invisible window operation. (gethwnd): Delete definition. * winsup.h (gethwnd): Delete declaration.
2004-05-15revert previous not-ready-for-primetime checkin.Christopher Faylor6-93/+55
2004-05-15* cygheap.h: Remove some parameter names from declarations throughout.Christopher Faylor8-61/+105
(cygheap::set): Reflect changes in declaration for arguments and return value from previous checkin.
2004-05-15* cygheap.h (cwdstuff::set): Modify return value and arguments.Christopher Faylor2-36/+68
* path.cc (chdir): Specify PC_POSIX. Do not call SetCurrentDirectory. Set posix_cwd in a way that does not break find.exe. Change call to cwd.set. (cwdstuff::get_initial): Do not call GetCurrentDirectory here. (cwdstuff::set): Call SetCurrentDirectory and GetCurrentDirectory as needed.
2004-05-12remove keyword stuffChristopher Faylor1-292/+2
2004-05-12 * path.cc (path_conv::check): Don't bail out with error if path is "//".Corinna Vinschen2-1/+5
2004-05-12 * cygheap.h (struct init_cygheap): Add mt_h member.Corinna Vinschen3-3/+10
* fhandler_tape.cc (mt_h): Drop in favor of cygheap based handle. (mtinfo_init): Use cygheap->mt_h handle. Protect it.
2004-05-122004-05-12 Pierre Humblet <pierre.humblet@ieee.org>Pierre Humblet4-36/+61
* tty.h: Remove the %d or %x from all cygtty strings. (tty::open_output_mutex): Only declare. (tty::open_input_mutex): Ditto. (tty::open_mutex): New definition. * fhandlet_tty.cc (fhandler_tty_slave::open): Declare buf with size CYG_MAX_PATH and replace __small_printf calls by shared_name. * tty.cc (tty::create_inuse): Ditto. (tty::get_event): Ditto. (tty::common_init): Ditto. (tty::open_output_mutex): New method definition. (tty::open_input_mutex): Ditto. (tty::open_mutex): New method.
2004-05-11 * fhandler.cc (fhandler_base::open): Set file attributes to correctCorinna Vinschen3-0/+9
value when creating files. * path.h (class path_conv): Add write accessor for file_attributes.
2004-05-10 * fhandler.h (class fhandler_socket): Add "owner" status flag.Corinna Vinschen3-12/+50
* fhandler_socket.cc (wait): Take flag parameter to take FD_OOB into account. Don't wait infinitely. (fhandler_socket::recvfrom): Also wait for FD_OOB if socket owner. (fhandler_socket::recvmsg): Ditto. (fhandler_socket::sendto): Ditto. (fhandler_socket::sendmsg): Ditto. (fhandler_socket::fcntl): Set owner status flag if F_SETOWN with own pid is called.
2004-05-092004-05-09 Pierre Humblet <pierre.humblet@ieee.org>Pierre Humblet2-11/+17
* environ.cc (build_env): Only try to construct required-but-missing variables while issetuid.
2004-05-08* syscalls.cc: Include environ.h.Christopher Faylor3-11/+14
(chroot): Set errno in case of path error. Call getwinenv. * environ.cc: Remove the NO_COPY attribute of conv_envvars.
2004-05-07 * fhandler_mem.cc (fhandler_dev_mem::fhandler_dev_mem): MoveCorinna Vinschen2-19/+19
initialization of "mem_size" from here... (fhandler_dev_mem::open): ...to here. Fix typo in FH_PORT case.
2004-05-07 * fhandler_dsp.cc (fhandler_dev_dsp::Audio_out::stop): Move delete ofCorinna Vinschen2-10/+23
bigwavebuffer_ so that it is always cleaned, also in child processes. (fhandler_dev_dsp::Audio_in::stop): Ditto. (fhandler_dev_dsp::close): Stop audio play immediately in case of abnormal exit.
2004-05-07 Revert code reversion from 2004-04-03. So, revert to async I/O again.Corinna Vinschen5-143/+193
* fhandler.h (status): Add "closed" flag. (prepare): New method declaration. (wait): Ditto. (release): Ditto. * fhandler_socket.cc: Don't include wsock_event.h. (fhandler_socket::prepare): New method, moved from wsock_event. (fhandler_socket::wait): Ditto. (fhandler_socket::release): New method. (fhandler_socket::recvfrom): Simplify loop. (fhandler_socket::recvmsg): Ditto. (fhandler_socket::sendto): Ditto. (fhandler_socket::sendmsg): Ditto. * net.cc: Don't include wsock_event.h. (wsock_event::prepare): Remove. (wsock_event::wait): Ditto. * wsock_event.h: Remove.
2004-05-07fix entryChristopher Faylor1-1/+6
2004-05-07* thread.cc (pthread::create): Move postcreate call to avoid a potential race.Christopher Faylor1-0/+7
(pthread::cancelable_wait): Don't allow signal interrupt unless main thread.
2004-05-07Christopher Faylor <cgf@timesys.com>Christopher Faylor3-16/+33
* path.cc (mount_info::conv_to_posix_path): Add return.
2004-05-062004-05-06 Pierre Humblet <pierre.humblet@ieee.org>Pierre Humblet2-74/+52
* path.cc (path_conv::check): Strip trailing dots and spaces and return error if the final component had only dots and spaces. (normalize_posix_path): Revert 2004-04-30. (chdir): Do not check for trailing spaces. Do not set native_dir to c:\ for virtual devices. Pass only native_dir to cwd.set. (cwdstuff::set): Assume posix_cwd is already normalized.
2004-05-05fix changelog datesChristopher Faylor1-2/+2
2004-05-04* path.cc (normalize_win32_path): Detect components with only dots. Remove aChristopher Faylor2-36/+32
final . if it follows '\\'. (mount_info::conv_to_win32_path): Only backslashify the path when no mount is found. (chdir): Do not look for components with only dots.
2004-05-04* path.cc (is_unc_share): Remove redundant tests.Christopher Faylor3-11/+14
2004-05-04 * crt0.o (mainCRTStartup): 16 byte align stack for main function.Corinna Vinschen2-0/+6
2004-05-04 * path.cc (check_sysfile): Don't scan string twice.Corinna Vinschen2-2/+7
2004-05-03 * dir.cc (writable_directory): Remove.Corinna Vinschen4-51/+8
(mkdir): Remove call to writable_directory. * syscalls.cc (unlink): Ditto. (rename): Ditto. * winsup.h (writable_directory): Remove declaration.
2004-04-30 * fhandler.cc (fhandler_base::open): Call path_conv::get_nt_native_pathCorinna Vinschen4-20/+40
for evaluating NT path. * path.cc (normalize_posix_path): Remove trailing dots and spaces. (path_conv::get_nt_native_path): New function. * path.h (class path_conv): Declare get_nt_native_path method.
2004-04-30 * fhandler.cc (fhandler_base::open): Fix NT native path evaluationCorinna Vinschen2-10/+20
to allow opening serial ports.
2004-04-30 * init.cc (threadfunc_fe): Hack to make thread stacks always 16Corinna Vinschen2-0/+7
byte aligned.
2004-04-21 * syscalls.cc (lseek64): Fix debug_printf format string.Corinna Vinschen3-2/+12
(truncate64): Ditto. * fhandler.cc (fhandler_base::lseek): Force res to -1 on error.
2004-04-20fix commentChristopher Faylor1-1/+1
2004-04-20* path.cc (is_unc_share): Rename from slash_unc_prefix_p throughout.Christopher Faylor2-40/+37
* path.cc (normalize_posix_path): Process all Posix paths and map three or more initial slashes to a single one. Simplify processing following two initial slashes. (normalize_win32_path): Make last argument non-optional and do not check for NULL value.
2004-04-20 * fhandler_disk_file.cc (fhandler_base::open_fs): ChangeCorinna Vinschen5-46/+66
set_file_attribute call to indicate that NT security isn't used. (fhandler_disk_file::fchmod): Rearrange to isolate 9x related statements. Do not set FILE_ATTRIBUTE_SYSTEM. (fhandler_disk_file::fchown): Check noop case first. * fhandler.cc (fhandler_base::open9x): Remove ntsec related statements. (fhandler_base::set_name): Do not set namehash. * fhandler.h (fhandler_base::get_namehash): Compute and set namehash if needed. * syscalls.cc (access): Verify that fh is not NULL. Do not set PC_FULL. (chmod): Ditto. (chown_worker): Ditto. (stat_worker): Ditto. Verify if the path exists.
2004-04-20 * fhandler.cc (fhandler_base::open): Remove special DEV_FLOPPY_MAJORCorinna Vinschen4-9/+13
treatment. * fhandler_raw.cc (fhandler_dev_raw::open): Simplify write-only case. * fhandler_tape.cc (fhandler_dev_tape::raw_write): Add accidentally dropped condition.
2004-04-20 * fhandler.cc (fhandler_base::open): Add FILE_READ_ATTRIBUTES whenCorinna Vinschen2-1/+6
only GENERIC_WRITE access is requested.
2004-04-19 * include/cygwin/mtio.h (GMT_ASYNC): New define.Corinna Vinschen2-1/+7
(MT_ST_ASYNC_WRITES): Remove "Not supported" comment.
2004-04-19 * errno.cc (errmap): Handle ERROR_IO_PENDING.Corinna Vinschen7-23/+130
* fhandler.cc (fhandler_base::open): Make tape I/O asynchronous. * fhandler.h (class fhandler_dev_tape): Add mt_evt member. * fhandler_tape.cc (mtinfo_drive::initialize): Initialize async_writes. (mtinfo_drive::close): Handle async writes. (mtinfo_drive::read): Add mt_evt parameter. Use overlapped I/O. (mtinfo_drive::async_wait): New function. (mtinfo_drive::write): Add mt_evt parameter. Use overlapped I/O. Handle async writes. (mtinfo_drive::_set_pos): Handle async writes. (mtinfo_drive::set_partition): Ditto. (mtinfo_drive::prepare): Ditto. (mtinfo_drive::get_status): Drop useless "else". Handle async_writes flag. (mtinfo_drive::set_options): Handle async_writes flags. (fhandler_dev_tape::close): Close mt_evt handle. (fhandler_dev_tape::raw_read): Create mt_evt handle and use in call to mtinfo_drive::read. (fhandler_dev_tape::raw_write): Create mt_evt handle and use in call to mtinfo_drive::write. * mtinfo.h (MTINFO_VERSION): Bump. (enum dirty_state): Add async_write_pending state. (class mtinfo_drive): Add OVERLAPPED struct "ov". Add async_writes flag. (mtinfo_drive::async_wait): Add declaration. (mtinfo_drive::read): Add mt_evt parameter. (mtinfo_drive::write): Ditto. * registry.cc (load_registry_hive): Call enable_restore_privilege instead of set_process_privilege.
2004-04-19 * fhandler_tape.cc (mtinfo_drive::_set_pos): Take additional dont_waitCorinna Vinschen3-9/+17
parameter. Use in call to SetTapePosition. (mtinfo_drive::set_pos): Accomodate _set_pos calls to above change. (mtinfo_drive::set_partition): Ditto. * mtinfo.h (mtinfo_drive::_set_pos): Change declaration accordingly.
2004-04-17fix commentsChristopher Faylor1-2/+1
2004-04-16 * autoload.cc (NtCreateFile): Add.Corinna Vinschen14-144/+293
* dir.cc (mkdir): Change set_file_attribute call to indicate that NT security isn't used. * fhandler.cc (fhandler_base::open_9x): New method, created from fhandler_base::open. (fhandler_base::open): Rearrange to use NtCreateFile instead of CreateFile. * fhandler.h (enum query_state): Redefine query_null_access to query_stat_control. query_null_access isn't allowed in NtCreateFile. (fhandler_base::open_9x): Declare. * fhandler_disk_file.cc (fhandler_base::fstat_fs): Use query_stat_control first, query_read_control if that fails. (fhandler_disk_file::fchmod): Call enable_restore_privilege before trying to open for query_write_control. Don't fall back to opening for query_read_control. (fhandler_disk_file::fchown): Ditto. (fhandler_disk_file::facl): Only request restore privilege and query access necessary for given cmd. * fhandler_raw.cc (fhandler_dev_raw::open): Call fhandler_base::open instead of opening device here. * ntdll.h (NtCreateFile): Declare. * path.cc (symlink_worker): Change set_file_attribute call to indicate that NT security isn't used. * sec_acl.cc (getacl): Fix bracketing. * sec_helper.cc (enable_restore_privilege): New function. * security.cc (str2buf2uni_cat): New function. (write_sd): Don't request restore permission here. * security.h (set_process_privileges): Drop stale declaration. (str2buf2uni): Declare. (str2buf2uni_cat): Declare. (enable_restore_privilege): Declare. * syscalls.cc (fchown32): Return immediate success on 9x.