Commit Graph

914 Commits

Author SHA1 Message Date
Earnie Boyd 49a5f0809b * include/locale.h: Apply Danny Smith patch 101834
2000-11-23  Danny Smith  <danny_r_smith_2001@yahoo.co.nz>
	(LC_MIN) Add definition.
 	(LC_MAX) ditto.
	(_wsetlocale) Add prototype.
2001-01-16 14:51:03 +00:00
Christopher Faylor 9470a80c8b * wait.cc (wait4): Rename variable for consistency. Allow restartable signal
behavior.
2001-01-16 02:29:47 +00:00
Corinna Vinschen 9334c89c1d * mmap.cc (mmap): Add more parameter checking. Change error output
in case of EINVAL. Treat mmapping /dev/zero like MAP_ANONYMOUS.
2001-01-15 22:18:14 +00:00
Corinna Vinschen c6dd43f263 * mmap.cc: include <unistd.h>. Define some bit operations for
the new page map.
        (mmap_record): Change type of base_address_ to caddr_t.
        Add map_map_ member. Add several methods to manipulate map_map_.
        (mmap_record::alloc_map): New method.
        (mmap_record::free_map): Ditto.
        (mmap_record::find_empty): Ditto.
        (mmap_record::map_map): Ditto.
        (mmap_record::unmap_map): Ditto.
        (list::add_record): Change return type to `mmap_record *'.
        Allocate page map.
        (list::match): New method.
        (mmap): Partly rewritten to take care for the new page map. Add some
        parameter checking.
        (munmap): Ditto.
2001-01-15 19:42:33 +00:00
Corinna Vinschen 66097f06dd * heap.cc (heap_init): Fix extern declaration of getpagesize.
* syscalls.cc (getpagesize): Fix another typo.
2001-01-15 12:53:30 +00:00
Corinna Vinschen dc3651b6cd * syscalls.cc (getpagesize): Save pagesize in global variable to
avoid calling GetSystemInfo too often.
        * heap.cc (getpagesize): Eliminate.
        (heap_init): Use getpagesize function from syscalls.cc.
2001-01-15 12:25:00 +00:00
Corinna Vinschen 4cf2c0e0cb * sysconf.cc (sysconf): return `getpagesize ()' on _SC_PAGESIZE
request to avoid implementing the same twice.
2001-01-15 10:58:19 +00:00
Christopher Faylor a3ec080b35 * syscalls.cc (_read): Use more lightweight method for determining if read has
been interrupted by a signal.
2001-01-14 19:08:30 +00:00
Christopher Faylor c3d62298ba * debug.h: Add regparm attributes to some functions.
* signal.cc (sigaction): Don't treat SIGCONT specially.
* exceptions.cc (interrupt_setup): Save sa_flags of interrupted signal for
later use.
(sig_handler): Default any stopping signal to SIGSTOP.
(call_signal_handler): New function.
(sigdelayed0): New function.
* sigproc.cc (sigproc_init): Initialize SIGSTOP sigaction for special behavior.
* sigproc.h: Define call_signal_handler.
* syscalls.cc (_read): Allow restartable signal behavior.
2001-01-12 05:38:25 +00:00
Corinna Vinschen c4efddf601 * fhandler.h (fhandler_base): New method `fixup_mmap_after_fork'.
(fhandler_disk_file: Ditto.
        (fhandler_dev_mem): Ditto.
        * fhandler_mem.cc (fhandler_dev_mem::open): Set OBJ_INHERIT attribute
        for device\physicalmemory handle.
        (fhandler_dev_mem::mmap): Ditto.
        * fhandler_mem.cc (fhandler_dev_mem::fixup_mmap_after_fork): New method.
        * mmap.cc (mmap_record): Add private `fdesc_' member. Change constructor
        accordingly.
        (get_fd): New method.
        (mmap): Use new mmap_record constructor.
        (fhandler_base::fixup_mmap_after_fork): New method.
        (fhandler_disk_file::fixup_mmap_after_fork): Ditto.
        (fixup_mmaps_after_fork): Call `fixup_mmap_after_fork' of appropriate
        fhandler class.
2001-01-11 12:33:12 +00:00
Christopher Faylor 37770e0009 * regtool.cc (cmd_list): Add new registry display options.
(cmd_list): Add code to implement -p, -k, and -l options.
* regtool.cc (Fail): Add call to LocalFree to free memory allocated by
FormatMessage.
2001-01-10 22:34:02 +00:00
Christopher Faylor 7adad1217b more formatting changes. 2001-01-10 15:22:40 +00:00
Christopher Faylor b82a7a5e35 * regtool.cc (translate): Ensure that 'c' is initialized.
(cmd_set): Ditto for rv.
2001-01-10 14:20:16 +00:00
Christopher Faylor 7416e1d2f6 * sigproc.cc (wait_sig): Allow SIGCONT when stopped. 2001-01-10 13:53:38 +00:00
Corinna Vinschen 55ae1dff87 Patch suggested by Ren� M�ller Fonseca <fonseca@mip.sdu.dk>
* include/sys/socket.h: Change prototype to have 2nd parameter `const'.
        * net.cc (cygwin_bind): Change 2nd parameter to `const'.
2001-01-09 16:00:58 +00:00
Christopher Faylor 077ec4cb37 * pinfo.cc (codepage_init): Move function.
* environ.cc (codepage_init): To here.
* exceptoins.cc (SIG_NONMASKABLE): Remove SIGCONT from consideration since it
is supposed to be maskable.
* signal.cc (sigaction): Ditto.
* sigproc.cc (wait_sig): Ditto.
* winsup.h: Eliminate global declaration of codepage_init.
2001-01-08 04:02:02 +00:00
Corinna Vinschen f3236259b4 * resource.cc (getrlimit): Set errno on EFAULT instead of returning it.
(setrlimit): Ditto.

        Patch by David Sainty <David.Sainty@optimation.co.nz>:
        * resource.cc (setrlimit): Prevent failing with an error when the
        operation would not have changed anything.
2001-01-05 09:01:18 +00:00
Christopher Faylor a5e570bcc3 * thread.cc: Need LONG_MAX definition. 2001-01-04 18:33:39 +00:00
Christopher Faylor 4104f35e67 * thread.cc (MTinterface::CreateSemaphore): Correctly set semaphore max. 2001-01-03 18:50:25 +00:00
Christopher Faylor c79ec95060 * fhandler_console.cc (fhandler_console::read): Restore missing test for code
page before doing OemToCharBuff.
2001-01-03 14:45:47 +00:00
Christopher Faylor 1bdc5f1fab Wed Jan 3 09:20:20 2001 Jason Tishler <jt@dothill.com>
* include/cygwin/version.h: Fix typo in CYGWIN_VERSION_DLL_COMBINED
	macro.
2001-01-03 14:44:13 +00:00
Corinna Vinschen 8a93913d26 * cygwin.din: Add symbols for `getrlimit' and `setrlimit'.
* exceptions.cc (stackdump): Avoid creating stackdump when
        `rlim_core' is 0.
        * resource.cc: New global variable `rlim_core'.
        (getrlimit): New function.
        (setrlimit): Ditto.
        include/cygwin/version.h: Bump minor API version to 32 due to
        adding `getrlimit' and `setrlimit'.
        include/sys/resource.h: Add defines, types and prototypes for
        `getrlimit' and `setrlimit'.
2000-12-27 00:13:57 +00:00
Christopher Faylor 2803e941b3 * autoload.h: Make DLL initializers global to avoid inlining.
* exceptions.cc (interrupt_setup): Reorganize arguments to allow use of
regparm.
(interrupt_now): Ditto.
(interrupt_on_return): Ditto.
(call_handler): Ditto.
2000-12-26 03:21:05 +00:00
Christopher Faylor 48c4679d55 * include/cygwin/version.h: Bump DLL minor version number to 8. 2000-12-25 18:37:44 +00:00
Christopher Faylor 45eb603342 missed a spot. 2000-12-25 17:49:36 +00:00
Christopher Faylor 446760ac78 * lib/Makefile.in: Don't make "links" to include/w32api directory. 2000-12-25 17:23:29 +00:00
Corinna Vinschen 8b2a7164ac * cygwinenv.sgml: Fix typo in <filename>. Add missing </para>. 2000-12-22 17:02:02 +00:00
Corinna Vinschen d6a289bac1 Fix syntax. 2000-12-20 12:43:22 +00:00
Corinna Vinschen aa2b85cc90 * autoload.cc: Add load statemant for SetSecurityDescriptorControl.
* security.cc (alloc_sd): Always set SE_DACL_PROTECTED flag on
        Win2K and higher.
2000-12-20 12:42:43 +00:00
Corinna Vinschen e625e1b99e * include/winbase.h: Add prototype for SetSecurityDescriptorControl. 2000-12-20 12:36:28 +00:00
Christopher Faylor 7d72d04c77 * exceptions.cc (reset_signal_arrived): Make global to avoid inlining. 2000-12-20 06:03:16 +00:00
Christopher Faylor 2bfdcd8a5f * fhandler_serial.cc (fhandler_serial::raw_read): Always find number of bytes
ready to be read whether overlapped_armed or not.
2000-12-20 05:57:59 +00:00
Corinna Vinschen 3112d7a41c * syscalls.cc (remove): New function, overriding the newlib
implementation.
2000-12-19 20:43:41 +00:00
Corinna Vinschen f3549a047a * cygwinenv.sgml: Add text for `smbntsec' option. 2000-12-19 20:14:34 +00:00
Corinna Vinschen 5827f4d98a * environ.cc (struct parse_thing): Add entry for new CYGWIN option
`smbntsec'.
        * path.cc (path_conv::check): Check path for being a remote path.
        If so and `allow_smbntsec' is set to FALSE, set has_acls to FALSE.
        * security.cc: Add global definition for `allow_smbntsec'.
        * security.h: Add extern declaration for `allow_smbntsec'.
        * fhandler.cc (fhandler_disk_file::open): Eliminate extern declaration
        of `allow_ntsec'.
        * syscalls.cc: Ditto.
2000-12-19 19:52:57 +00:00
Christopher Faylor 64069abe03 * cygcheck.cc (cygwin_info): Add some more bounds checking. From Matt Harget
<matt@use.net>:
* utils/cygcheck.cc (keyeprint): Move declaration before other functions so it
could be used by all functions to report error messages.  Add comment.
(add_path): Check for NULL return from malloc.
(find_on_path): Check initial uses of pointers for NULL.
(rva_to_offset): Ditto.
(init_paths): Add checking for return values of Win32 calls.
(get_dword): Ditto.
(get_word): Ditto.
(dll_info): Ditto, also add NULL pointer checks.
(scan_registry): Ditto.
(check_keys): Ditto.
(dump_sysinfo): Ditto.  Add default case to switch.  Add error reporting if
GetVolumeInformation fails, except when it returns ERROR_NOT_READY.
(track_down): Add checking for NULL pointers and return values of Win32 calls.
(cygwin_info): Ditto.  Correct small memory leak.
2000-12-16 04:53:30 +00:00
Christopher Faylor 085ec17c5d * fhandler_console.cc (read): Add support for xterm-style mouse event
reporting.
(fhandler_console::char_command): Honor mouse events.
(fhandler_console::open): Enable mouse input events.
(fhandler_console::input_tcsetattr): Ditto.
* select.cc (peek_console): Add check for mouse events.
2000-12-16 03:11:02 +00:00
Christopher Faylor 7fbcbc9592 * path.cc (normalize_posix_path): Calculate path name length overruns more
dynamically.
(normalize_win32_path): Ditto.
* Makefile.in: Avoid scanning the directory twice for *.d files.
2000-12-15 22:25:51 +00:00
Christopher Faylor 80d0051c37 * fhandler.h (fhandler_console): Add additional argument to char_command
method.
* fhandler_console.cc (fhandler_console::read): Revert previously misapplied
patch.
(fhandler_console::char_command): Add a second argument.
(fhandler_console::write): Recognize when a '?' is found after a <esc>[.
2000-12-15 04:42:20 +00:00
David Starks-Browning fcd5787f95 new entry, installing cygwin-inst snapshots with setup 2000-12-13 16:44:43 +00:00
David Starks-Browning cf427ba344 update contents 2000-12-13 16:16:35 +00:00
David Starks-Browning e65ed025c4 very minor wording change 2000-12-13 16:12:17 +00:00
David Starks-Browning ff15e09cc9 update globbing entry 2000-12-13 15:43:32 +00:00
David Starks-Browning 740dea68d0 new entries about contributing packages 2000-12-12 17:42:21 +00:00
David Starks-Browning 88e066655c try again... 2000-12-12 16:07:14 +00:00
David Starks-Browning 5c8836b916 add tip about -lm order to WinMail@16 entry 2000-12-12 16:05:30 +00:00
David Starks-Browning 9972a88b3f add entry about mt on Win9x 2000-12-12 14:51:12 +00:00
David Starks-Browning 566ca2a79d update & expand section on multiple DLLs 2000-12-12 14:24:42 +00:00
David Starks-Browning 9a442f7f8d tiny fix 2000-12-12 13:51:18 +00:00
David Starks-Browning 7ae4fd5600 added structure (unsolved vs. FITNR).
added entry about scp leaving ssh procs on Win9x.
2000-12-12 13:47:50 +00:00
David Starks-Browning 9eb8e25c48 screen has now been ported 2000-12-12 13:26:59 +00:00
David Starks-Browning 8d3ba197bc these problems are fixed now 2000-12-12 13:24:06 +00:00
Corinna Vinschen 947411367d * net.cc (cygwin_rexec): Eliminate superfluous call to
`set_socket_inheritance'.
        * include/sys/socket.h: Add SUS defines for option values to `shutdown'.
2000-12-11 19:45:54 +00:00
Christopher Faylor 772231a055 * lib/Makefile.in: Install headers and libraries in tooldir. 2000-12-11 18:14:15 +00:00
Christopher Faylor a239df7f57 * Makefile.in: Compile/link dumper.exe with c++. 2000-12-11 00:10:49 +00:00
Christopher Faylor 67bd6fb222 * include/sysexits: New file. 2000-12-10 22:19:50 +00:00
Christopher Faylor ee1d77e4b7 * autoload.cc: Autoload CharToOemA.
* dcrt0.cc (dll_crt0_1): Translate command line to OEM if current codepage is
OEM.
* environ.cc: Add new option 'codepage' to CYGWIN environment variable.
* fhandler_clipboard.cc (fhandler_clipboard::read): Read clipboard in OEM mode
if current codepage is OEM.
* fhandler_console.cc (fhandler_console::read): Only translate console input if
current codepage is ANSI.
* fhandler_console.cc (fhandler_console::write_normal): Translate output data
if current codepage is ANSI.
* pinfo.cc (codepage_init): New function.  Setup current codepage from CYGWIN
environment variable and set codepage for file APIs.
* security.cc (read_sd): Translate file name to it if current codepage is OEM.
* winsup.h: (sys_wcstombs,sys_mbstowcs): Use current codepage for translations
between multibyte and widechar string and vice versa.
2000-12-10 00:45:12 +00:00
Christopher Faylor 307cb8ba82 * path.cc (normalize_win32_path): Check for explicit use of two slashes at the
beginning of a path.  These should be treated specially regardless of whether
they are UNC paths or old-style //a paths.  Avoid adding cwd to a path if the
path already begins with '/'.
2000-12-09 21:31:49 +00:00
Christopher Faylor 82c8d7ef8c * path.cc (normalize_win32_path): Reorganize logic to accomodate chroot.
Always check for MAX_PATH overrun.  Avoid adding one too many backslashes when
src path begins with a slash.  From Corinna Vinschen.
* winsup.h: Force demangling for dll_crt0 for newer compilers.
2000-12-09 03:29:33 +00:00
Corinna Vinschen 2a688c15ad * cygwin.din: Declare strtok_r for the import lib. Already in the DLL. 2000-12-07 19:43:37 +00:00
Corinna Vinschen 9ae2974ffd * mkpasswd.c: make default home directory /home/$user if one
can't be found in user registry. Allow user to override
        that with command line arg.
        (longopts): Fix typo in `local-groups' option.
        (main): Initialize `passed_home_path' before first usage.
2000-12-07 10:31:01 +00:00
Christopher Faylor 37c49e19f2 Make initial tabbing consistent. 2000-12-07 03:20:21 +00:00
Corinna Vinschen 81e615de98 * winsup/cygwin/include/sys/uio.h: readv: Correct prototype
writev: ditto.
2000-12-06 22:42:26 +00:00
Earnie Boyd 48ba505b8b * include/winnls.h: NORM_IGNORE* remove duplicate defines.
SORT_STRINGSORT: ditto.
	CMAP*: ditto.
	CTRY_*: add new defines.
	LGRPID_*: ditto.
	LCMAP*: change defines to hex notation.
	CALID: change from ULONG to DWORD.
	CALTYPE: ditto.
	_cpinfoex[AW]: add structure.
	FoldString: correct Unicode mappings.
	GetCPInfoEx[AW]: add prototypes.
	EnumCalendarInfoEx[AW]: ditto.
	EnumDateFormatsEx[AW]: ditto.
	EnumSystemLanguageGroups[AW]: ditto.
	EnumLanguageGroupLocales[AW]: ditto.
	EnumUILanguages[AW]: ditto.
	GetSystemDefaultUILanguage[AW]: ditto.
	GetUserDefaultUILanguage[AW]: ditto.
	IsValidLanguageGroup[AW]: ditto.
	CALINFO_ENUMPROCEX[AW]: add function pointer typedef
	LANGUAGEGROUP_ENUMPROC[AW]: ditto
	LANGGROUPLOCALE_ENUMPROC[AW]: ditto
	UILANGUAGE_ENUMPROC[AW]: ditto
	DATEFMT_ENUMPROCEX[AW]: ditto
	LPCURRENCYFMT[AW]: add structure pointer typedef
	LPNUMBERFMT[AW]: ditto

	* ChangeLog: Correct entry by Matt Hargett to include file name.
2000-12-05 17:26:01 +00:00
Corinna Vinschen fdb352765e * include/sys/uio.h: Include <sys/cdefs.h>. Use __BEGIN_DECL and
__END_DECL.
        Add declarations for `readv' and `writev'.
2000-12-05 16:08:48 +00:00
Corinna Vinschen 96963a1423 * Added a define for INVALID_SET_FILE_POINTER, a possible return
code for the SetFilePointer() win32 API call.
2000-12-05 08:53:45 +00:00
Corinna Vinschen 785e8cc89e * Makefile.in: Change `-nostartfiles' to `-nostdlib' to avoid
automatic linking with default libraries when linking new-cygwin1.dll.
	Link with libgcc.a and libstdc++.a explicitly.
2000-12-04 20:05:41 +00:00
Christopher Faylor 191bacb0be * path.cc (normalize_win32_path): Handle UNC paths better.
(slash_unc_prefix_p): Allow backslash UNC paths.
2000-12-03 06:21:40 +00:00
Christopher Faylor 92311ab5e5 * Makefile.in: Use CXX to build the DLL.
* configure.in: Find correct c++ compiler.
* configure: Regenerate.
2000-12-03 05:42:03 +00:00
Christopher Faylor 8494f61e7c * Makefile.common: Eliminate checks for libgcc.a and libstdc++.a. Use CXX for
g++ compiles.
* configure.in: Find correct c++ compiler.
* configure: Regenerate.
2000-12-03 05:40:45 +00:00
Christopher Faylor b0a187e204 * Makefile.in: Remove some extra cruft. 2000-12-03 05:20:56 +00:00
Christopher Faylor 6c057e82df * Makefile.in: Use CXX to build the DLL.
* configure.in: Find correct c++ compiler.
* configure: Regenerate.
* path.cc (normalize_posix_path): Put correct drive at beginning of \foo style
paths.
(chdir): Don't send non-posix path to cygcwd.set.
2000-12-03 05:16:33 +00:00
Corinna Vinschen 6b6a8cefad * net.cc (get_inet_addr ): Close AF_UNIX socket file after reading. 2000-12-02 21:29:00 +00:00
Corinna Vinschen 09872ef885 * cygheap.cc (chgheap_root::operator =): Check root dir properly. 2000-11-29 22:27:15 +00:00
Earnie Boyd b52aba3fc2 * Makefile.in: eliminate the need for RUNTIME and CRT_ID.
Always build crt1.o, dllcrt1.o, crt2.o and dllcrt2.o.
	Create a libcoldname.a for the oldname library for CRTDLL.
	Restrict libmoldname.a for the oldname library for MSVCRT.
	* configure.in: eliminate setting RUNTIME and CRT_ID variables.
	Restructure the $target_os case logic.
	Always name the MinGW thread dll helper mingwm.
	Change Cygwin's HEADER_SUBDIR value from mingw32 to mingw.
	* configure: regenerate.
2000-11-29 21:14:48 +00:00
Corinna Vinschen 38c5dd446e * net.cc (cygwin_inet_aton): Return nonzero if the address
is valid, zero if not according to Linux man page.
2000-11-29 17:15:00 +00:00
David Starks-Browning ab96569985 New entry "Bash says "command not found", but it's right there!" 2000-11-29 16:24:59 +00:00
Christopher Faylor 95ec0f241f * mmap.cc (munmap): Check that mmap and munmap length match. 2000-11-28 21:25:45 +00:00
Corinna Vinschen e1a993d549 * fhandler.cc (fhandler_disk_file::open): Check for buggy CreateFile
condition.
        * path.cc (path_conv::check): Get file system type in call to
        GetVolumeInformation to check for file systems with buggy CreateFile.
        * path.h (enum path_types): Add PATH_HASBUGGYOPEN.
        (class path_conv): Add methods `has_buggy_open' and
        `set_has_buggy_open'.
2000-11-28 18:45:42 +00:00
Christopher Faylor fe1c7fe7a6 * fhandler.cc (is_at_eof): New function.
(fhandler_base::raw_read): Detect special case where last error ==
ERROR_NOACCESS but the file is at EOF.  Most UNIXes do not consider this to be
an error.
2000-11-26 21:45:16 +00:00
Christopher Faylor e0cdea91fe * include/cygwin/version.h: Bump DLL minor version number to 7. 2000-11-26 19:46:17 +00:00
Corinna Vinschen 2e68f6b47e * include/cygwin/version.h: Bump minor API version due to adding
inet_aton.
2000-11-25 10:29:49 +00:00
Corinna Vinschen 0bec01198b * net.cc (cygwin_inet_aton): New function.
* cygwin.din: Export cygwin_inet_aton as inet_aton.
2000-11-25 10:23:55 +00:00
Christopher Faylor 93c1e56b2d * path.cc (mount_info::read_cygdrive_info_from_registry): Read system cygdrive
prefix with KEY_READ.
(mount_info::get_cygdrive_info): Ditto.
2000-11-24 18:04:44 +00:00
Earnie Boyd c84242b6f3 * Makefile.in: Fix bindist target to distribute the correct files.
Remove the use of SNAPSHOT variable and test SNAPDATE instead.
	Set SNAPDATE within the snapshot target on recursive call to $(MAKE).
2000-11-22 23:43:23 +00:00
Corinna Vinschen 65e0f5ebc2 * include/winnt.h: Add missing FILE_NAMED_STREAMS define. 2000-11-22 21:27:36 +00:00
Christopher Faylor 0217c5bb3b * Makefile.in: new-temp.a -> new-templib.a 2000-11-22 16:19:53 +00:00
David Starks-Browning 872134b37d Update "why doesn't chmod work" with hint from Corinna. 2000-11-22 13:07:14 +00:00
Earnie Boyd cc100085ed * Makefile.in: Add missing line continuation `\' for $(SUBDIRS) target.
Add variables and targets to control binary and source distributions.
	Add variables and targets to control snapshot distribution.
	* profile/gmon.h: Add missing #endif for #ifndef.
	* profile/ChangeLog: Merge entries here and remove.
	* profile/Makefile.in: Add variables and targets to control
	distribution.
	* README: Add.
	* TODO: ditto.
	* config.guess: ditto.
	* config.sub: ditto.
	* mkinstalldirs: ditto.
	* install-sh: ditto.
	* configure: regenerate.
	* profile/configure: ditto.
2000-11-22 01:51:53 +00:00
Earnie Boyd 6126c12345 * include/direct.h: add guard around MSVCRT-only prototytpes
* include/io.h: add __int64 struct definitions and function prototypes;
		 add guard for MSVCRT-only prototypes
	* include/limits.h: add ISO C9x macros LLONG_MIN, LLONG_MAX, ULLONG_MAX
	* include/stdio.h: add wchar function prototypes (__MSVCRT__);
		 put wchar functions together to make sync with wchar.h easier
	* include/stdlib.h: add wide char functions (__MSVCRT__)
	* include/string.h: add string collation functions ( __MSVCRT__)
	* include/sys/stat.h: add __int64 struct and function ( __MSVCRT__)
	* include/tchar.h: add macros and macro function definitions
	* include/wchar.h: add wide char function prototypes ( __MSVCRT__ );
		enclose more functions in __MSVCRT__ guard;
		some oldname wide char function prototypes #if (0)'d
	* profile/gmon.h: add guard around BSD-ish typedefs
2000-11-21 02:50:03 +00:00
Christopher Faylor d5b692284b * Makefile.in: Use a different variable name for subdirectory since the
previous one was used by the top level make.
2000-11-21 00:00:05 +00:00
Christopher Faylor 9784d54da8 * spawn.cc (spawn_guts): Quoting was still wrong. Keep trying to fix it. 2000-11-20 22:10:13 +00:00
Christopher Faylor 099efae038 * spawn.cc (spawn_guts): YA tweak for dealing with arcane rules of quoting in
"normal" Microsoft programs.
* child_info.h: Bump fork magic number.
* include/sys/mount.h: Add an entry for mixed mode.
2000-11-20 19:35:45 +00:00
David Starks-Browning bbed89ab13 sources.redhat.com -> cygwin.com where appropriate 2000-11-20 14:37:37 +00:00
Christopher Faylor 7665ae4aca * Makefile.in: Install mingw stuff in a subdirectory if building under cygwin. 2000-11-20 01:52:26 +00:00
Christopher Faylor 86d2c003fe *** empty log message *** 2000-11-19 04:58:18 +00:00
Christopher Faylor 04979a0fc3 * utils.sgml: Document new options for ps and strace. 2000-11-19 04:55:49 +00:00
Christopher Faylor 9f7bdd2b58 * cygwinenv.sgml: Remove CYGWIN=strace option. Update CYGWIN options.
* how-programming.texinfo: Remove stuff about CYGWIN=strace.
* setup2.sgml: Remove CYGWIN=strace example.
2000-11-19 04:53:46 +00:00
Corinna Vinschen 46ba13261b * path.cc (normalize_posix_path): Special care for root directory
in case of files beginning with a dot.
2000-11-17 18:39:47 +00:00
David Starks-Browning 2ef98494d8 Add Windows ME to "What is it?" 2000-11-17 15:09:55 +00:00
David Starks-Browning 7cb2bb152d Add 'Windows 2000' to "What is it?" entry. 2000-11-17 14:12:23 +00:00
David Starks-Browning ef01aeac68 Update entry "I'm having basic problems with find. Why?", add advice
about -follow option if CWD is symlink.
2000-11-17 14:04:59 +00:00
David Starks-Browning 7816541772 Update "Why is make behaving badly?", add warning about make -j[n]. 2000-11-17 13:32:28 +00:00
David Starks-Browning e2ed94a3c6 New entry "Setup screwed up my mounts!" 2000-11-17 12:57:51 +00:00
David Starks-Browning b9448841db Fix error in "Why doesn't my script work?", add note about 'mount -x'. 2000-11-17 12:10:04 +00:00
David Starks-Browning 2f2092aece new entry "Why doesn't my script work?" 2000-11-17 11:40:06 +00:00
Corinna Vinschen 1126c2b042 * syslog.cc (syslog): Add users SID to NT syslog entry. 2000-11-17 11:30:14 +00:00
Christopher Faylor 879c443594 Fix typo. 2000-11-17 05:15:17 +00:00
Christopher Faylor 5758fdf31d * fhandler_console.cc: New member variable `dwBufferSize' for `info'.
(fillin_info): Set `dwBufferSize' to the size of the console buffer.
(clear_screen): Use width of console buffer to calculate how many spaces to
clear.
2000-11-17 03:01:14 +00:00
Christopher Faylor 992b0a24d0 * Makefile.in: Make import library creation 'make -j2' friendly. 2000-11-16 20:32:27 +00:00
David Starks-Browning cb06d7468a New entry "Why doesn't mkdir -p work on a network share?" 2000-11-16 15:08:35 +00:00
Corinna Vinschen eb79d041f8 * uinfo.cc (uinfo_init): Call `cygwin_set_impersonation_token' to
reset `cygheap->user.token' to INVALID_HANDLE_VALUE.
2000-11-16 09:53:26 +00:00
Christopher Faylor 0dc9dc8b3a Update ChangeLog. 2000-11-16 05:21:03 +00:00
Christopher Faylor 0d675c5d7f * sigproc.cc (wait_sig): Remove unneeded for loop iteration.
* exceptions.cc (interrupt_setup): Don't set signal mask here or races occur
with main thread.  Set it in sigdelayed instead.
(sigreturn): Reflect change in stack order of ebp and flags.
(sigdelayed): Set stack frame correctly.  Call set_process_mask here with flags
for last trapped signal.
(signal_dispatch): Add newmask.
* sigproc.cc (wait_sig): Eliminate ill-considered attempt to halt looping
signal processors.
2000-11-16 05:16:59 +00:00
Corinna Vinschen cb6f4dbd0c * uinfo.cc (internal_getlogin): Change parameter list to reflect
that `token' is member of cygheap_user now.
        (uinfo_init): Use modified internal_getlogin.
        * syscalls.cc (seteuid): Ditto.
2000-11-15 21:14:27 +00:00
Corinna Vinschen 66c161baac * cygheap.h: Move `token' and `impersonated' from class _pinfo
to class cygheap_user.
        * pinfo.h: Ditto.
        * fork.cc (fork_child): Change usage of `token' and `impersonated'
        accordingly.
        (fork_parent): Ditto.
        * security.cc (cygwin_set_impersonation_token): Ditto.
        * sigproc.cc (proc_subproc): Ditto.
        * spawn.cc (spawn_guts): Ditto.
        * syscalls.cc (seteuid): Ditto.
        * uinfo.cc (uinfo_init): Ditto.
2000-11-15 21:04:02 +00:00
Corinna Vinschen cc35b56c95 * spawn.cc (spawn_guts): Revert patch to ignore chroot settings
on creating native Win32 environment.
2000-11-15 09:01:33 +00:00
Christopher Faylor 5ba05cab08 * fork.cc (slow_pid_reuse): Off-by-one. 2000-11-15 06:46:19 +00:00
Christopher Faylor 84aeff4126 Throughout use myself->ppid_handle rather than parent_alive.
* child_info.h (child_info): Eliminate parent_alive.
* dcrt0.cc (dll_crt0_1): Call fork_init for debugging pid creation.
* fork.cc (fork_child): Reflect change to fixup_mmaps_after_fork arguments.
(slow_pid_reuse): New function to grab last 'n' pids to prevent pid reuse.
(fork_parent): Move last_fork_proc into slow_pid_reuse.  Handle fork_pids
debugging.  Eliminate unnecessary call to set_child_mmap_ptr.
(fork_init): New debugging function.
* mmap.cc (fixup_mmaps_after_fork): Renamed from recreate_mmaps_after_fork.
Rely on copied data after a fork.
(set_child_mmap_ptr): Eliminate.
* pinfo.h (_pinfo): Eliminate parent_alive, mmap_ptr and reflect above changes.
* spawn.cc (spawn_guts): Eliminate vestiges of "old way" of sending new hProc
to parent process.
2000-11-15 06:27:48 +00:00
Corinna Vinschen fb0a875733 Fix formatting. 2000-11-15 00:13:44 +00:00
Corinna Vinschen 1f0f8e127c * cygheap.cc (cygheap_root::cygheap_root): New function.
(cygheap_root::~cygheap_root): Ditto.
        (cygheap_root::operator=): Ditto.
        (cygheap_user::~cygheap_user): Ditto.
        (cygheap_user::set_name): Ditto.
        (cygheap_user::set_logsrv): Ditto.
        (cygheap_user::set_domain): Ditto.
        (cygheap_user::set_sid): Ditto.
        * cygheap.h (cygheap_root): New class.
        (cygheap_user): Ditto.
        (init_cygheap): Change type of `root' member to cygheap_root.
        Add `user' member.
        * dir.cc (opendir): Use new `cygheap_root' class.
        * dcrt0.cc (dll_crt0_1): Use new `cygheap_user' class.
        * fork.cc (fork_parent): Ditto.
        * grp.cc (getgroups): Ditto.
        * passwd.cc (search_for): Ditto.
        * path.cc: Use new `cygheap_root' class throughout.
        * pinfo.h (_pinfo): Remove `use_psid'. Move `username', `psid',
        `logsrv', `domain', `orig_{uid,gid}' and `real_{uid,gid}' to
        cygheap_user class.
        * security.cc: Use new `cygheap_user' class throughout.
        * shared.cc (sec_user): Ditto.
        * sigproc.cc (proc_subproc): Remove copy statements for user
        related information moved to `cygheap_user' class.
        * spawn.cc (spawn_guts): Invalidate current chroot settings
        when creating Windows environment. Use new `cygheap_user' class.
        * syscalls.cc: Use new `cygheap_user' class throughout.
        * uinfo.cc: Ditto.
        * uinfo.cc (internal_getlogin): Change parameters to reflect the
        move of user information to cygheap.
2000-11-15 00:13:09 +00:00
Corinna Vinschen fe8c097112 * dir.cc (rewinddir): Always set __d_position = 0, so next
call to readdir() will restart the directory scan.
2000-11-14 16:06:52 +00:00
Christopher Faylor a4785603b8 * cygheap.h (init_cygheap): New struct holding values that live in the Cygwin
heap.
* child_info.h (child_info): Change pointer type of cygheap to init_cygheap.
* cygheap.cc (init_cheap): Point cygheap_max after contents of cygheap.  Move
some stuff into cygheap.h.
* dir.cc (opendir): Change to use root and rootlen in cygheap rather than in
myself.
(mkdir): Change to use umask in cygheap rather than in myself.
* path.cc: Ditto, throughout.
* syscalls.cc (_open): Ditto.  Change to use umask in cygheap rather than in
myself.
(chroot): Change to allocate root dir on the cygwin heap.
(umask): Change to use umask in cygheap rather than in myself.
(cygwin_bind): Ditto.
* sigproc.cc (proc_subproc): Don't copy umask or root stuff as this happens
automatically now.
* pinfo.h (_pinfo): Migrate stuff out of here and into init_cheap.
* dcrt0.cc (dll_crt0_1): Call cygheap_init later in startup for first cygwin
process.
2000-11-14 05:53:32 +00:00
Christopher Faylor 70a11195b9 * path.cc (get_device_number): Allow /dev/ttySn to designate a com port. 2000-11-13 04:06:41 +00:00
Christopher Faylor 49421cd9c5 * path.h: Add __attribute__ ((regparm(x))) to commonly used functions.
* pinfo.h: Ditto.
* sigproc.h: Ditto.
* sync.h: Ditto.
2000-11-12 04:57:41 +00:00
Christopher Faylor 6ccb6bcf3d * dcrt0.cc: New global variable `ignore_case_with_glob'.
(dll_crt0_1): Disable case-insensitive globbing before calling `main'.
* environ.cc (glob_init): New static function to set or clear
`ignore_case_with_glob'.
(known): Changed "glob" entry to call `glob_init'.
* glob.c (match): Use case-insensitive globbing if needed.
2000-11-11 05:36:34 +00:00
Christopher Faylor 466ebd61d3 remove include/rapi.h 2000-11-09 18:07:16 +00:00
Corinna Vinschen edd7573015 * dir.cc (readdir): Avoid reading from the beginning when
readdir is called after a previous call has returned NULL.
2000-11-09 13:32:33 +00:00
Christopher Faylor 3aae15c9ba Increase cygwin heap size. 2000-11-09 02:39:45 +00:00
Christopher Faylor c5d03f3dca * select.cc (peek_pipe): Deal with pending newline in pty_master. 2000-11-09 02:03:33 +00:00
Christopher Faylor 4c35f9f01f * mount.cc (main): Call show_cygdrive_info instead of show_cygdrive_prefixes.
* mount.cc (show_cygdrive_prefixes): Remove function.
* mount.cc (show_cygdrive_info): New function.  Actually, show_cygdrive_info is
really an enhanced version of show_cygdrive_prefixes renamed to
show_cygdrive_info that also displays the user and system flags.
2000-11-08 20:39:45 +00:00
Christopher Faylor 9bc846bd3d * environ.cc (_addenv): malloc space for setenv if cygwin1.dll is used in
conjunction with older binaries.
(environ_init): Ditto.
* external.cc (get_cygdrive_info): New function.
* external.cc (get_cygdrive_prefixes): Change to use get_cygdrive_info but toss
the user and system flags.
* external.cc (cygwin_internal): Add new CW_GET_CYGDRIVE_INFO case.
* path.cc (mount_info::get_cygdrive_prefixes): Remove method.
* path.cc (mount_info::get_cygdrive_info): New method.  Actually,
get_cygdrive_info is really an enhanced version of get_cygdrive_prefixes
renamed to get_cygdrive_info that also gets the user and system flags.
* shared_info.h (get_cygdrive_prefixes): Remove method.
* shared_info.h (get_cygdrive_info): New method.
* include/cygwin/version.h: Bump minor API version due to adding
CW_GET_CYGDRIVE_INFO to cygwin_internal.
* include/sys/cygwin.h (cygwin_getinfo_types): Add CW_GET_CYGDRIVE_INFO.
2000-11-08 20:36:37 +00:00
Corinna Vinschen 315f8fd37b * mkgroup.c (load_netapi): New function to load netapi32.dll functions
dynamically so that mkgroup works on 9x/ME as well.
        Use corresponding function pointers throughout.
        (usage): Change to `int'. Change text to be conformant to mkpasswd.
        (main): Use `getlongopt' to process options.
        Special handling to create a group entry on 9x/ME.
        * mkpasswd.c (load_netapi): New function to load netapi32.dll functions
        dynamically so that mkpasswd works on 9x/ME as well.
        Use corresponding function pointers throughout.
        (usage): Change to `int'. Change text to be conformant to mkgroup.
        (main): Use `getlongopt' to process options.
        Special handling to create a passwd entry on 9x/ME.
        Change conditional to create an entry for the local administrators
        group when appropriate.
2000-11-08 15:00:02 +00:00
Corinna Vinschen 4c25744f86 * autoload.cc: Add autoload statement for `WSASetLastError'.
* net.cc (cygwin_connect): Change error code to WSAEINPROGRESS
        when connect returns WSAEWOULDBLOCK.
2000-11-07 20:01:09 +00:00
Christopher Faylor 64ef9db779 Fix typos. 2000-11-07 19:00:02 +00:00
Christopher Faylor 442a3c7821 Update copyright. 2000-11-07 02:21:33 +00:00
Christopher Faylor c0188ae7cb * dcrt0.cc (sigthread::init): Reinstitute sigthread lock as a critical section.
(dll_crt0_1): Move sigthread lock initialization to earlier in startup.
* exceptions.cc (interrupt_on_return): Remove previous kludgy attempt to detect
an invalid frame.
(call_handler): Eliminate inner for loop.  Grab signal critical section lock
where appropriate.
* sigproc.cc (proc_subproc): Restore uid setting.
* sigproc.h (sigthread): Reinstitute sigthread lock as a critical section.
(sigframe): Grab the sigthread lock before clearing frame to avoid having the
signal thread use an invalid frame.
2000-11-06 23:12:05 +00:00
Christopher Faylor a98b1584c2 * path.cc (mount_info::read_cygdrive_info_from_registry): Use
CYGWIN_INFO_CYGDRIVE_PREFIX, CYGWIN_INFO_CYGDRIVE_DEFAULT_PREFIX, and
CYGWIN_INFO_CYGDRIVE_FLAGS.
* path.cc (mount_info::write_cygdrive_info_to_registry): Use
CYGWIN_INFO_CYGDRIVE_PREFIX and CYGWIN_INFO_CYGDRIVE_FLAGS.
* path.cc (mount_info::remove_cygdrive_info_from_registry): Ditto.
* path.cc (mount_info::get_cygdrive_prefixes): Use CYGWIN_INFO_CYGDRIVE_PREFIX.
* include/cygwin/version.h: Add CYGWIN_INFO_CYGDRIVE_FLAGS,
CYGWIN_INFO_CYGDRIVE_PREFIX, and CYGWIN_INFO_CYGDRIVE_DEFAULT_PREFIX.
2000-11-06 16:40:29 +00:00
Earnie Boyd 014b820a0d * Makefile.in: increment VERSION.
(dist:) Rename to srcdist.  Create new dist target to call
	srcdist and bindist targets.
	(srcdist:) New target.
	(clean-top:) add call to mostlyclean-top and add rm of distribution
	tarballs.
	* lib/Makefile.in: (uninstall:) modify to remove files from the
	new w32api subdirectory and to remove w32api subdirectory.
	(xuninstall:) Ditto.
	TODO: Add a task to redo the clean targets of Makefile.in
2000-11-06 16:17:16 +00:00
Christopher Faylor df664bc1a8 * errno.cc (strerror): Change EAGAIN case to return "Resource temporarily
unavailable" instead of "No more processes".
2000-11-06 16:13:44 +00:00
Christopher Faylor f8038d021f Fix typo. 2000-11-06 06:38:21 +00:00
Christopher Faylor dd11f11fae * child_info.h (child_info): Add pppid_handle for closing the parent's of the
parent handle.
* dcrt0.cc (_dll_crt0): Close parent's parent handle when spawned or forked.
* debug.cc (add_handle): Correct erroneous reference to handle structure when
printing warning.
* exceptions.cc (interrupt_now): Always return 1.
(interrupt_on_return): Accept a sigthread argument.  Check to see if this
argument has been trashed prior to setting up the stack return.
(call_handler): Add a loop around attempts to dispatch signals to detect case
where interrupt_on_return fails.
(_sigdelayed): Set up a temporary frame pointer prior to calling stuff that
could trigger an interrupt or the stack walking code will be very confused.
* fork.cc (fork_parent): Move a lot of the setup of the child process into
proc_subproc.
* spawn.cc (spawn_guts): Ditto.  Use ppid_handle to contact logical parent when
reparenting.
* pinfo.h (_pinfo): Remember the logical handle of the parent process.
* sigproc.cc (proc_subproc): Record most stuff necessary for the _pinfo
structure that is inferrable from myself when adding children.
(wait_sig): Always set 'pending_signals' flag when about to kick off the signal
scanning loop.  Reset it only if there are no pending signals.
2000-11-06 06:36:32 +00:00
Christopher Faylor 95101076e5 * pinfo (wait_subproc): Son of neverending debug tweaking. 2000-11-05 18:47:28 +00:00
Christopher Faylor 914f7bf565 * pinfo (wait_subproc): Neverending debug tweaking. 2000-11-05 16:47:00 +00:00
Christopher Faylor 0c9ae85d56 * pinfo.cc (winpids:add): New method.
(winpids::enumNT): New method renamed from EnumProcessesNT.  Use add method to
add elements to the lists.
(winpids::enum9x): New method renamed from EnumProcesses9x.  Use add method to
add elements to the lists.
(winpids::enum_init): Accept 'winpid' parameter to control whether to add all
windows pids to the list.
(winpids::release): New method.
* pinfo.h (winpids): Reflect above changes.
* signal.cc (kill_pgrp): Ditto.
* external.cc (fillout_pinfo): Ditto.
2000-11-05 06:42:23 +00:00
Christopher Faylor 7edb836a68 * exceptions.cc (handle_sigsuspend): Record frame here for signalling.
(set_process_mask): Ditto.
2000-11-05 03:08:39 +00:00
Christopher Faylor 1ae469adf4 * sigproc.cc (wait_subproc): Still more debugging cleanup. 2000-11-04 19:25:55 +00:00
Christopher Faylor e46db834d9 * pinfo.cc (EnumProcessesNT): Avoid 0 pids.
(EnumProcesses9x): Ditto.
* sigproc.cc (remove_childe): Eliminate.
(proc_subproc): Move remove_child stuff here.
(wait_subproc): Synchronize with proc_subproc when error occurs.  Add more
debugging info.
* sigproc.h (procstuff): Add an entry.
* spawn.cc (spawn_guts): Add sigframe here.
2000-11-04 05:54:57 +00:00
Christopher Faylor 46209564d4 * lib/Makefile.in: Install header files in w32api subdirectory. 2000-11-04 02:51:36 +00:00
Christopher Faylor c2445f2abc * sigproc.cc (wait_subproc): Refine debug output. 2000-11-04 01:08:23 +00:00