Commit Graph

15369 Commits

Author SHA1 Message Date
Joel Sherrill c9e978ed1b 2013-11-21 Daniel Ramirez <javamonn@gmail.com>
* d30v/syscalls.c, i960/mon960.c, m68k/io-stat.c, mt/stat.c,
	spu/lstat.c, spu/stat.c: Add restrict keyword.
2013-11-21 16:42:17 +00:00
Joel Sherrill 21cf2aee53 2013-11-21 Joel Sherrill <joel.sherrill@oarcorp.com>
* libc/sys/rdos/stat.c: Remove stray +.
2013-11-21 16:39:06 +00:00
Joel Sherrill 32e2cbeeab 2013-11-21 Daniel Ramirez <javamonn@gmail.com>
* libc/include/sys/stat.h, libc/sys/linux/sys/stat.h,
	libc/sys/m88kbug/syscalls.c, libc/sys/rdos/stat.c,
	libc/sys/sparc64/sys/stat.h: Add restrict keyword.
2013-11-21 16:35:47 +00:00
Marcus Shawcroft 37d3b04f88 [AArch64] Set errno in ftruncate() and truncate(). 2013-11-21 15:53:52 +00:00
Marcus Shawcroft eee6552c95 [ARM] set errno in ftruncate and truncate stubs. 2013-11-21 15:49:05 +00:00
Joel Sherrill 3c7451d8de 2013-11-20 Daniel Ramirez <javamonn@gmail.com>
* libc/include/search.h, libc/search/tdelete.c: Add restrict keyword.
2013-11-20 18:22:27 +00:00
Joel Sherrill ea9d80921f 2013-11-20 Chirayu Desai <chirayudesai1@gmail.com>
* libc/include/regex.h, libc/posix/regcomp.c,
	libc/posix/regerror.c, libc/posix/regex.3
	libc/posix/regexec.c: Add restrict keyword.
2013-11-20 16:25:50 +00:00
Joel Sherrill a2c4eac5d0 2013-11-20 Daniel Ramirez <javamonn@gmail.com>
* libc/iconv/lib/iconv.c, libc/include/iconv.h,
	libc/sys/linux/iconv/iconv.c: Add restrict keyword.
2013-11-20 13:39:36 +00:00
Corinna Vinschen c03063e2fc * include/cygwin/stdlib.h (realpath): Drop declaration. It's declared
in newlib's stdlib.h now.
2013-11-20 09:48:04 +00:00
Corinna Vinschen 8273b2112f * libc/include/stdlib.h: Declare realpath only if !__STRICT_ANSI__. 2013-11-20 09:46:39 +00:00
Corinna Vinschen 8856f1f00e * cygcheck.cc (RtlGetVersion): Declare.
(dump_sysinfo): Call RtlGetVersion rather than GetVersionEx to get
	correct OS info even on Windows 8.1.  Don't check return value since
	RtlGetVersion never fails per MSDN.  Move fetching kernel32 module
	handle where it's really needed.  Drop temporary comment added by
	previous checkin.
2013-11-19 22:26:37 +00:00
Corinna Vinschen c9f36df332 * ntdll.h (RtlGetVersion): Declare.
* wincap.cc (wincapc::init): Rather than GetVersionEx, call
	RtlGetVersion which is not crippled by missing Windows 8.1 manifest.
	* wincap.h (wincapc): Change type of version to RTL_OSVERSIONINFOEXW.
	Align formatting of all class members.
2013-11-19 22:21:11 +00:00
Corinna Vinschen f8863cbe54 * cygcheck.cc (dump_sysinfo): Revert Windows 8.1 hack. It's not
working.  Add a (hopefully temporary) comment.
2013-11-19 20:43:04 +00:00
Corinna Vinschen 690d1333f5 * wincap.cc (wincapc::init): Revert previous change. It's not working. 2013-11-19 20:37:27 +00:00
Joel Sherrill 3007afbca3 3013-11-19 Jennifer Averett <jennifer.averett@oarcorp.com>
* libc/sys/rtems/sys/cpuset.h: New file.
2013-11-19 19:11:24 +00:00
Corinna Vinschen 32da4b09d2 *** empty log message *** 2013-11-19 18:10:47 +00:00
Corinna Vinschen 0732e52c41 * net.cc (cygwin_getaddrinfo): Fix a comment. Only memset whints if
hints is NULL.  Add a comment and set whints.ai_family explicitely to
	AF_UNSPEC to follow glibc man page closely.  Check flags against whints
	for locality.
2013-11-19 18:07:46 +00:00
Corinna Vinschen 705b50fe39 * wincap.cc (wincapc::init): Fix dwMinorVersion for Windows 8.1 and
Server 2012.  Explain why this is necessary.
2013-11-19 18:01:04 +00:00
Corinna Vinschen 85cef403d8 Add missing entry 2013-11-19 17:49:35 +00:00
Corinna Vinschen d134686a10 * cygcheck.cc (dump_sysinfo): Drop code trying to fetch OSVERSIONINFO
if fetching OSVERSIONINFOEX failed.  Drop code handling unsupported
	platform IDs.  Add code to tweak dwMinorVersion on Windows 8.1 if no
	manifest is present.
2013-11-19 17:44:33 +00:00
Joel Sherrill 670c036efa Fix date 2013-11-19 17:39:43 +00:00
Joel Sherrill aed5f73fa8 2013-11-18 Joel Sherrill <joel.sherrill@oarcorp.com>
* libc/include/stdlib.h: Add prototype of realpath().
	* libc/sys/linux/realpath.c: Add restrict keyword.
2013-11-19 17:32:24 +00:00
Joel Sherrill 7dffe44b09 2013-11-19 Joel Sherrill <joel.sherrill@oarcorp.com>
* libm/common/modfl.c: Add cast to remove compiler warning.
2013-11-19 17:28:04 +00:00
Corinna Vinschen 5b56e9b02b * autoload.cc (IdnToAscii): Define.
(IdnToUnicode): Define.
	(FreeAddrInfoW): Define.
	(GetAddrInfoW): Define.
	(GetNameInfoW): Define.
	* net.cc: Drop W. Richard STEVENS libgai implementation.
	(cygwin_freeaddrinfo): Move code from ipv4_freeaddrinfo here.  Move
	definition up in file to avoid forward declaration in ga_duplist.
	(ga_dup): Take addrinfoW as input.  Add parameters to get IDN flags
	and to set error value.  Handle IDN flags and especially AI_CANONIDN.
	Convert input wchar_t ai_canonname string to multibyte for output.
	(ga_duplist): Add parameters to get IDN flags and to set error value
	and propagate to ga_dup.  Call cygwin_freeaddrinfo.
	(gai_errmap): Add comments.  Align error strings to GLibc.  Add
	EAI_IDN_ENCODE entry.
	(get_ipv6_funcs): Remove.
	(load_ipv6_guard): Remove.
	(ipv6_inited): Remove.
	(load_ipv6): Remove.
	(load_ipv6_funcs): Remove.
	(cygwin_getaddrinfo): Drop calling load_ipv6.  Handle AI_IDN* flags.
	Convert input strings to wchar_t and call GetAddrInfoW/FreeAddrInfoW.
	In case hints is NULL, set default ai_flags explicitely to
	AI_V4MAPPED | AI_ADDRCONFIG, as documented for Glibc.  Only add AI_ALL
	if AI_ADDRCONFIG is not given.  Unconditionally add Windows-specific
	AI_DISABLE_IDN_ENCODING to ai_flags to make IDN behaviour compatible
	to Glibc even on Windows 8 and later.
	(cygwin_getnameinfo): Drop calling load_ipv6.  Handle NI_IDN* flags.
	Call GetNameInfoW and convert returned strings from wchar_t to
	multibyte.
	* include/netdb.h: Add comments to describe flags and error values.
	(AI_*): Define all flags using hex values for clearness.
	(AI_IDN): Define.
	(AI_CANONIDN): Define.
	(AI_IDN_ALLOW_UNASSIGNED): Define.
	(AI_IDN_USE_STD3_ASCII_RULES): Define.
	(NI_*): Define all flags using hex values for clearness.
	(NI_IDN): Define.
	(NI_IDN_ALLOW_UNASSIGNED): Define.
	(NI_IDN_USE_STD3_ASCII_RULES): Define.
	(EAI_IDN_ENCODE): Define.
2013-11-19 13:29:37 +00:00
Corinna Vinschen ff125797e3 * libc/posix/closedir.c: Fix use after free.
Remove useless test dd_fd != -1
	* libc/posix/readdir.c: Remove useless test dd_fd == -1
	* libc/posix/readdir_r.c: Ditto.
2013-11-19 11:48:02 +00:00
Corinna Vinschen 700a3783ee * Makefile.in (cygcheck.exe): Link against wininet.dll.
(dumper.exe): Link against psapi.dll.
	* cygcheck.cc (_WIN32_WINNT): Define as 0x0602.
	(pInternetCloseHandle): Drop pointer.
	(PRODUCT_UNLICENSED): Drop definition.
	(PRODUCT_PROFESSIONAL_WMC): Ditto.
	(package_grep): Delete code loading wininet functions dynamically, just
	call functions directly.
2013-11-19 11:14:36 +00:00
Corinna Vinschen e576e42013 *** empty log message *** 2013-11-19 10:47:09 +00:00
Corinna Vinschen 32fefe6e24 * cygcheck.cc (dump_sysinfo): Distinguish Windows 8 and 8.1, as well
as Windows Server 2012 and 2012 R2.  Add missing commas in products
	array to avoid crashes.  Drop Windows NT4 and 2000 printouts.  Just
	call IsWow64Process, GetNativeSystemInfo, and GetDiskFreeSpaceEx
	directly, rather than loading them dynamically, since they are exported
	by all supported OS versions.  Fix questionable type usage in call to
	GetDiskFreeSpaceEx.
2013-11-19 10:43:10 +00:00
Joel Sherrill 481cb456a4 2013-11-18 Sahil Patnayakuni <sahilp@oarcorp.com>
* libc/include/stdio.h, libc/machine/powerpc/vfscanf.c,
	libc/machine/spu/fgetpos.c, libc/machine/spu/fgets.c,
	libc/machine/spu/fopen.c, libc/machine/spu/fputs.c,
	libc/machine/spu/fread.c, libc/machine/spu/freopen.c,
	libc/machine/spu/fwrite.c, libc/machine/spu/setbuf.c,
	libc/machine/spu/vfprintf.c, libc/machine/spu/vfscanf.c,
	libc/machine/spu/vsnprintf.c, libc/machine/spu/vsprintf.c,
	libc/machine/spu/vsscanf.c, libc/stdio/asnprintf.c,
	libc/stdio/asprintf.c, libc/stdio/dprintf.c,
	libc/stdio/fgetpos.c, libc/stdio/fgets.c,
	libc/stdio/fmemopen.c, libc/stdio/fopen.c,
	libc/stdio/fprintf.c, libc/stdio/fputs.c,
	libc/stdio/fread.c, libc/stdio/freopen.c,
	libc/stdio/fscanf.c, libc/stdio/fwrite.c,
	libc/stdio/printf.c, libc/stdio/scanf.c,
	libc/stdio/setbuf.c, libc/stdio/snprintf.c,
	libc/stdio/sprintf.c, libc/stdio/sscanf.c,
	libc/stdio/vdprintf.c, libc/stdio/vprintf.c,
	libc/stdio/vscanf.c, libc/stdio/vsnprintf.c,
	libc/stdio/vsprintf.c, libc/stdio/vsscanf.c: Add restrict keyword.
2013-11-18 17:28:06 +00:00
Joel Sherrill 8ab08406da 2013-11-18 Sahil Patnayakuni <sahilp@oarcorp.com>
* libc/include/stdlib.h, libc/stdlib/mbstowcs.c,
	libc/stdlib/mbstowcs_r.c, libc/stdlib/mbtowc.c,
	libc/stdlib/mbtowc_r.c, libc/stdlib/strtod.c,
	libc/stdlib/strtol.c, libc/stdlib/strtold.c,
	libc/stdlib/strtoll.c, libc/stdlib/strtoll_r.c,
	libc/stdlib/strtoul.c, libc/stdlib/strtoull.c,
	libc/stdlib/strtoull_r.c, libc/stdlib/wcstombs.c,
	libc/stdlib/wcstombs_r.c: Add restrict keyword.
2013-11-18 17:26:52 +00:00
Marcus Shawcroft 7c62befe16 [AArch64] Provide ftruncate() and truncate() stubs. 2013-11-18 10:04:56 +00:00
Marcus Shawcroft c709105913 [ARM] Provide ftruncate() and truncate() stubs. 2013-11-18 09:53:46 +00:00
Corinna Vinschen 2b2290caba * newlib/libc/stdlib/getopt.c (getopt_internal): Add missing braces. 2013-11-13 20:04:18 +00:00
Corinna Vinschen 02365c2064 * newlib/libc/include/getopt.h (struct option): name field should be
"const char *".
	* newlib/libc/stdlib/getopt.c (getopt_internal): Use fputs()/fputc()
	instead of fprintf() to save code space.  Fix signed/unsigned
	comparison.
2013-11-13 09:09:45 +00:00
Corinna Vinschen 8246caa942 * faq-setup.xml (faq.setup.uninstall-service): Describe how to unhook
cyglsa DLL from OS before uninstalling.
2013-11-12 22:21:32 +00:00
Corinna Vinschen f1359420da * libc/libc/stdlib/getopt.c (getopt_internal): Fix NULL pointer access. 2013-11-12 11:30:32 +00:00
Corinna Vinschen 4146cc5ce7 * faq-setup.xml: Throughout remove setup.exe, use setup or setup-x86...
instead.
	(faq.setup.cli): Reproduce latest --help output.
	(faq.setup.noroot): New section.
	(faq.setup.setup-fails-on-ts): Remove section.
	* setup-net.xml (internet-setup): Mention setup-x86{_64} in first
	paragraph.  Add note to allow using setup.exe in subsequent paragraphs.
	Add paragraph to introduce --no-admin option.
2013-11-11 12:48:31 +00:00
Corinna Vinschen 874e065fa1 * libm/libm.texinfo: Rename node Index to Document Index.
* libc/libc.texinfo: Rename node Library Index to Document Index.
2013-11-08 12:48:29 +00:00
Christopher Faylor 13dbf6b0aa * Makefile.in: Properly cd to directory sans install_ prefix. Report on errors
on doc install.  Only 'all' is special.
2013-11-07 00:29:46 +00:00
Christopher Faylor 2a6d6db8e2 winsup/ChangeLog:
2013-11-06  Christopher Faylor  <me.cygwin2013@cgf.cx>

	* configure.ac: Detect windows headers/libs after we've figured out the
	C compiler.
	* configure: Regenerate.
	* aclocal.m4: Regenerate.
	* configure.cygwin: Default to '.' if can't find a winsup directory.

winsup/cygserver/ChangeLog:
2013-11-06  Christopher Faylor  <me.cygwin2013@cgf.cx>

	* configure.ac: Detect windows headers/libs after we've figured out the
	C compiler.
	* configure: Regenerate.
	* aclocal.m4: Regenerate.

winsup/cygwin/ChangeLog:
2013-11-06  Christopher Faylor  <me.cygwin2013@cgf.cx>

	* configure.ac: Detect windows headers/libs after we've figured out the
	C compiler.
	* configure: Regenerate.
	* aclocal.m4: Regenerate.

winsup/utils/ChangeLog:
2013-11-06  Christopher Faylor  <me.cygwin2013@cgf.cx>

	* configure.ac: Detect windows headers/libs after we've figured out the
	C compiler.
	* configure: Regenerate.
	* aclocal.m4: Regenerate.
2013-11-07 00:19:52 +00:00
Christopher Faylor 01eddfd7b2 * Makefile.in: Reinstate ignoring of errors for doc target. 2013-11-06 23:26:23 +00:00
Corinna Vinschen 2a98b3363e * libc/stdio/fvwrite.c: Allow writing in larger chunks for fully
buffered and unbuffered files, to improve write performance.
2013-11-04 14:18:44 +00:00
Corinna Vinschen 5b312b4747 * devices.in (dev_cygdrive_storage): Revert mapping to \Device\Null.
(dev_storage): Ditto for /dev.
	* devices.cc: Regenerate.
	* fhandler.cc (fhandler_base::open_null): New method to open a fake
	\Device\Null handler.
	(fhandler_base::open): Fix formatting.  Change O_ACCMODE test to a
	switch statement.  Simplify a test which still tested for a now unused
	create_disposition.
	* fhandler.h (fhandler_base::open_null): Declare.
	(fhandler_netdrive::close): Declare.
	* fhandler_dev.cc (fhandler_dev::open): Open fake \Device\Null handle
	by just calling new open_null method.
	* fhandler_disk_file.cc (fhandler_cygdrive::open): Ditto.
	* fhandler_netdrive.cc (fhandler_netdrive::open): Call open_null
	rather than setting nohandle.
	(fhandler_netdrive::close): New method.
	* fhandler_registry.cc (fetch_hkey): Fix token in RegOpenUserClassesRoot
	call.  Create valid key for HKEY_CURRENT_CONFIG by mapping to real key
	HKEY_LOCAL_MACHINE\System\CurrentControlSet\Hardware Profiles\Current.
	(fhandler_registry::open): Set nohandle only when using pseudo registry
	handle.
	* fhandler_virtual.cc (fhandler_virtual::opendir): Call open rather
	than just setting nohandle here.
	* fhandler_virtual::fstatvfs): Set ST_RDONLY fs flag.
	* globals.cc (ro_u_null): New readonly UNICODE_STRING for \Device\Null.
	* path.h (path_conv::set_path): Revert previous change caring for
	wide_path.
2013-10-31 14:26:42 +00:00
Corinna Vinschen a5f316d8cf * libc/stdio/fvwrite.h: change type of uio_resid from int to size_t to
fix fwrite() of > 2GByte buffers.
2013-10-31 10:35:54 +00:00
Corinna Vinschen 566fd12b68 Implement malloc_stats for nano.
* libc/stdlib/nano-mallocr.c (RONECALL): New parameter macro.
	(sbrk_start): New variable.
	(current_mallinfo, free_list): Forward declaration of data.
	(chunk): Define size as long type.
	(mallinfo): Synchronize with latest malloc.h.
	(nano_*): Forward declaration of functions.
	(get_chunk_from_ptr): Defined to static inline.
	(nano_mallinfo): Implement this function.
	(nano_malloc_stats): Implement this function.
2013-10-30 15:53:05 +00:00
Corinna Vinschen 4afcc6ced9 * libc/include/machine/_default_types.h: Revert change from 2013-10-10. 2013-10-30 15:51:13 +00:00
Corinna Vinschen b8dc053d2b *** empty log message *** 2013-10-30 10:00:32 +00:00
Corinna Vinschen 751bbaf96a * devices.in (dev_cygdrive_storage): Map to \Device\Null.
(dev_storage): Map /dev and /dev/windows to \Device\Null.
	* devices.cc: Regenerate.
	* dir.cc (opendir): Create unique id.  Explain why.
	* fhandler.h (fhandler_dev::get_dev): Implement inline.
	(fhandler_cygdrive::close): Drop declaration.
	(fhandler_cygdrive::get_dev): Implement inline.
	(fhandler_windows::get_hwnd): Ditto.
	(fhandler_windows::set_close_on_exec): Drop declaration.
	(fhandler_windows::fixup_after_fork): Ditto.
	* fhandler_dev.cc (fhandler_dev::open): Call fhandler_disk_file::open
	without O_CREAT flag.  Explain why.  Create \Device\Null handle if
	/dev/ doesn't actually exist.
	(fhandler_dev::close): Drop nohandle case.
	(fhandler_dev::fstatvfs): Drop nohandle check.  Test for fs_got_fs
	instead.  Set ST_RDONLY fs flag for simulated /dev.
	(fhandler_dev::opendir): If /dev doesn't exist, call open() to create
	fake \Device\Null handle.  Don't set nohandle.  Set dir_exists
	correctly.
	(fhandler_dev::rewinddir): Call fhandler_disk_file::rewinddir only if
	/dev is a real directory.
	* fhandler_disk_file.cc (fhandler_disk_file::opendir): If called for
	the cygdrive dir, call open() to create fake \Device\Null handle.
	Only attach __DIR_mounts buffer to dir if not called for cygdrive dir.
	Don't set nohandle.
	(fhandler_cygdrive::open): Create \Device\Null handle.
	(fhandler_cygdrive::close): Remove.
	(fhandler_cygdrive::fstatvfs): Set ST_RDONLY fs flag.
	* fhandler_windows.cc (fhandler_windows::open): Create \Device\Null
	handle.
	(fhandler_windows::read): Don't add io_handle to WFMO handle array.
	Change subsequent test for return value accordingly.  Fix test for
	"message arrived".
	(fhandler_windows::set_close_on_exec): Remove.
	(fhandler_windows::fixup_after_fork): Remove.
	* path.h (path_conv::set_path): Make sure wide_path is NULL when
	setting a new path.
	* select.cc (peek_windows): Use correct hWnd value, not io_handle.
	(fhandler_windows::select_read): Don't use io_handle as wait object.
	(fhandler_windows::select_write): Ditto.
	(fhandler_windows::select_except): Ditto.
2013-10-30 09:44:47 +00:00
DJ Delorie 0160e166ee merge from gcc 2013-10-29 15:14:27 +00:00
Corinna Vinschen 352d0b831e *** empty log message *** 2013-10-28 10:57:33 +00:00