Commit Graph

15405 Commits

Author SHA1 Message Date
Joel Sherrill a534dfd26e 2013-11-29 Sebastian Huber <sebastian.huber@embedded-brains.de>
* libc/include/pthread.h (pthread_cleanup_push): Delete prototype
	and add macro of the same name.
	(pthread_cleanup_pop): Likewise.
	(_pthread_cleanup_context): Define.
	(_pthread_cleanup_push): Likewise.
	(_pthread_cleanup_pop): Likewise.
	(pthread_cleanup_push_defer_np): Define if _GNU_SOURCE is defined.
	(pthread_cleanup_pop_restore_np): Likewise.
	(_pthread_cleanup_push_defer): Likewise.
	(_pthread_cleanup_pop_restore): Likewise.
2013-11-29 23:35:34 +00:00
Joel Sherrill 62c28b76ac 2013-11-29 Jennifer Averett <jennifer.averett@oarcorp.com>
* libc/include/pthread.h (pthread_attr_setaffinity_np):
	Add pthread SMP affinity attributes to methods to RTEMS for
	compatibility with GNU/Linux.
	(pthread_attr_getaffinity_np): Likewise.
	(pthread_setaffinity_np): Likewise.
	(pthread_getaffinity_np): Likewise.
	(pthread_getattr_np): Add for GNU/Linux compatibility.
	* libc/include/sys/types.h: Add cpuset to pthread_attr_t for RTEMS.
	* libc/include/sys/cdefs.h (_GNU_SOURCE): Defining _GNU_SOURCE
	turns on all _XXX_VISBLE feature flags.
2013-11-29 23:14:57 +00:00
Christopher Faylor 8116e5e59b * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 27. 2013-11-29 13:31:54 +00:00
Jon TURNEY 390aa0b67f * include/cygwin/stdlib.h(initstate, random, setstate, srandom) :
Prototype if not __STRICT_ANSI__ or _XOPEN_SOURCE is defined appropriately.
2013-11-29 13:05:43 +00:00
Corinna Vinschen fea986bdc6 * new-features.xml (ov-new1.7.26): Fix section ID and title. Add
posix_spawn item.
2013-11-29 10:14:13 +00:00
Corinna Vinschen f8b02da153 * include/glob.h: Fix invalid use of 'restrict' error. 2013-11-28 10:00:01 +00:00
Joel Sherrill 2d50094276 2013-11-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
* libc/sys/rtems/cpusetalloc.c: New file.
	* libc/sys/rtems/cpusetfree.c: Likewise.
	* libc/sys/rtems/Makefile.am (lib_a_SOURCES): Add new files.
	* libc/sys/rtems/Makefile.in: Regenerate.
	* libc/sys/rtems/sys/cpuset.h: Delete #if 0 block.  Include
	<stddef.h> for size_t.
	(_NCPUBITS): Avoid NBBY and assume 8 bits per char.
	(__cpuset_mask): Use int instead of size_t parameter for Linux
	compatibility.
	(__cpuset_index): Likewise.
	(__cpuset_alloc): Declare.
	(__cpuset_free): Likewise.
	(CPU_ALLOC_SIZE): Likewise.
	(CPU_ALLOC): Define.
	(CPU_FREE): Likewise.
	(CPU_ZERO_S): Likewise.
	(CPU_FILL_S): Likewise.
	(CPU_SET_S): Likewise.
	(CPU_CLR_S): Likewise.
	(CPU_ISSET_S): Likewise.
	(CPU_COUNT_S): Likewise.
	(CPU_AND_S): Likewise.
	(CPU_OR_S): Likewise.
	(CPU_XOR_S): Likewise.
	(CPU_NAND_S): Likewise.
	(CPU_EQUAL_S): Likewise.
	(CPU_ZERO): Use CPU_ZERO_S().
	(CPU_FILL): Use CPU_FILL_S().
	(CPU_SET): Use CPU_SET_S().
	(CPU_CLR): Use CPU_CLR_S().
	(CPU_ISSET): Use CPU_ISSET_S().
	(CPU_COUNT): Use CPU_COUNT_S().
	(CPU_AND): Use CPU_AND_S().
	(CPU_OR): Use CPU_OR_S().
	(CPU_XOR): Use CPU_XOR_S().
	(CPU_NAND): Use CPU_NAND_S().
	(CPU_EQUAL): Use CPU_EQUAL_S().
	(CPU_CMP): Delete superfluous const qualifier.
	(CPU_EMPTY): Likewise.
2013-11-27 14:53:59 +00:00
Corinna Vinschen 376b177749 * syscalls.cc (try_to_bin): Enhance debug output in case reopen fails. 2013-11-27 14:48:27 +00:00
Corinna Vinschen 1aaa128794 * syscalls.cc (try_to_bin): Drop fh_dup, reuse tmp_fh instead. 2013-11-27 14:30:36 +00:00
Corinna Vinschen 854ed5f03a * syscalls.cc (try_to_bin): Take additional parameter to get file open
flags.  If the file to move to the bin has been opened casesensitive,
	reopen it caseinsensitive.  Explain why.  Revert the default name of
	the Vista-and-later recycler to mixed case for readability.
	(unlink_nt): Call try_to_bin with file open flags as evaluated.
2013-11-27 14:27:34 +00:00
Corinna Vinschen 963addfa27 * libc/machine/mips/setjmp.S: Fix definition of macro FPR_LAYOUT
for ABI == N32.
2013-11-27 12:45:56 +00:00
Jeff Johnston a00d2722b6 2013-11-26 Matheus Almeida <Matheus.Almeida@imgtec.com>
* libc/include/machine/setjmp.h: Add support for __mips_fpr being
        64 and treat it the same as if __mips64 is set.
        * libc/machine/mips/setjmp.S: Ditto, plus add checks for _MIPS_SIM
        being _ABIN32 and _ABI64.
2013-11-26 19:58:19 +00:00
Corinna Vinschen a50f8f5973 * nlsfuncs.cc (wcscoll): Add "__restrict" to definition.
(wcsxfrm): Ditto.
2013-11-26 17:27:25 +00:00
Joel Sherrill db026d86d8 Correct for missing entries for wchar.h changes and white space changes 2013-11-26 17:27:08 +00:00
Joel Sherrill 380c9f6165 2013-11-26 Julio Gutierrez <jgutleyva@gmail.com>
*libc/include/wchar.h: Add restrict keyword.
	*libc/stdio/fgetws.c (fgetws): ditto.
	*libc/stdio/fputws.c (fputws): ditto.
	*libc/stdio/fwprintf.c (fwprintf): ditto.
	*libc/stdio/fwscanf.c (fwscanf): ditto.
	*libc/stdio/swprintf.c (swprintf): ditto.
	*libc/stdio/swscanf.c (swscanf): ditto.
	*libc/stdio/vfwprintf.c (vfwprintf): ditto.
	*libc/stdio/vfwscanf.c (vfwscanf): ditto.
	*libc/stdio/vswprintf.c (vswprintf): ditto.
	*libc/stdio/vswscanf.c (vswscanf): ditto.
	*libc/stdio/vwprintf.c (vwprintf): ditto.
	*libc/stdio/vwscanf.c (vwscanf): ditto.
	*libc/stdio/wprintf.c (wprintf): ditto.
	*libc/stdio/wscanf.c (wscanf): ditto.
	*libc/stdlib/mbrlen.c (mbrlen): ditto.
	*libc/stdlib/mbrtowc.c (mbrtowc): ditto.
	*libc/stdlib/mbsnrtowcs.c (mbsnrtowcs): ditto.
	*libc/stdlib/mbsrtowcs.c (mbsrtowcs): ditto.
	*libc/stdlib/wcrtomb.c (wcrtomb): ditto.
	*libc/stdlib/wcsnrtombs.c (wcsnrtombs): ditto.
	*libc/stdlib/wcsrtombs.c (wcsrtombs): ditto.
	*libc/stdlib/wcstod.c (wcstod): ditto.
	*libc/stdlib/wcstol.c (wcstol): ditto.
	*libc/stdlib/wcstold.c (wcstold): ditto.
	*libc/stdlib/wcstoll.c (wcstoll): ditto.
	*libc/stdlib/wcstoul.c (wcstoul): ditto.
	*libc/stdlib/wcstoull.c (cstoull): ditto.
	*libc/string/wcpcpy.c (wcpcpy): ditto.
	*libc/string/wcpncpy.c (wcpncpy): ditto.
	*libc/string/wcscat.c (wcscat): ditto.
	*libc/string/wcscpy.c (wcscpy): ditto.
	*libc/string/wcsncat.c (wcsncat): ditto.
	*libc/string/wcsncpy.c (wcsncpy): ditto.
	*libc/string/wcsstr.c (wcsstr): ditto.
	*libc/string/wcstok.c (wcstok): ditto.
	*libc/string/wcsxfrm.c (wcsxfrm): ditto.
	*libc/string/wmemcpy.c (wmemcpy): ditto.
2013-11-26 17:21:01 +00:00
Corinna Vinschen bb9d95eb38 * common.din: Export posix_spawn[...] functions.
* exec.cc (execve): Add EXPORT_ALIAS _execve.
	* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
	* posix.sgml (std-susv4):  Add posix_spawn[...] here.
	(std-notimpl): Drop here.
2013-11-26 17:11:09 +00:00
Corinna Vinschen d12e1c0670 * nlsfuncs.cc (strcoll): Add "__restrict" to definition.
(strxfrm): Ditto.
2013-11-26 17:08:56 +00:00
Joel Sherrill 6221252b5e 2013-11-25 Joel Sherrill <joel.sherrill@oarcorp.com>
* libc/iconv/lib/iconv.c, libc/time/strftime.c: Change "restrict<" to
        "restrict <" to fix formatting.
2013-11-26 14:38:58 +00:00
Corinna Vinschen 4d3c733045 * libc/posix/posix_spawn.c: Drop using namespace.h. 2013-11-26 13:51:19 +00:00
Corinna Vinschen 6fe752f94f * libc/posix/posix_spawn.c: Eliminate OS function calls not present
in newlib or Cygwin.
	(process_spawnattr): Use sigprocmask rather than _sigprocmask.  Use
	sigaction rather than _sigaction.
	(process_file_actions_entry): Use dup2 rather than _dup2.
	(do_posix_spawn): Use execvpe rather than _execvpe.  Use waitpid
	rather than _waitpid.
2013-11-26 13:48:00 +00:00
Joel Sherrill d264970f79 2013-11-25 Joel Sherrill <joel.sherrill@oarcorp.com>
* libc/iconv/lib/iconv.c, libc/time/strftime.c: Change "restrict<" to
	"restrict <" to fix formatting.
2013-11-25 17:55:33 +00:00
Corinna Vinschen 05efdc441d * libc/include/spawn.h (posix_spawn_file_actions_destroy): Fix typo
in function name.
	* libc/posix/posix_spawn.c (posix_spawn_file_actions_destroy): Ditto.
2013-11-25 17:23:30 +00:00
Joel Sherrill d482870337 2013-11-25 Sahil Patnayakuni <sahil.patnayakuni@gmail.com>
* libc/include/time.h (time): Add restrict keyword.
	* libc/include/wchar.h (wcsftime): Add restrict keyword.
	* libc/time/asctime_r.c (asctime_r): Same.
	* libc/time/gmtime_r.c (gmtime_r): Same.
	* libc/time/lcltime_r.c (lcltime_r): Same.
	* libc/time/strftime.c (strftime): Same.
	* libc/time/strptime.c (strptime): Same.
	* libc/sys/linux/linuxthreads/timer_create.c (timer_create): Same.
	* libc/sys/linux/linuxthreads/timer_settime.c (timer_settime): Same.
2013-11-25 13:46:23 +00:00
Corinna Vinschen 3073f26d6a Throughout, keep function definitions and declarations in sync with
newlib in terms of C99 "restrict" keyword.
2013-11-25 11:38:08 +00:00
Corinna Vinschen bd1af1cab5 * dtable.cc: Include sys/param.h for MAX definition. 2013-11-24 13:01:25 +00:00
Corinna Vinschen d2a88d9792 Throughout, drop unnecessary explicit includes of windows header files
included by default.
	* winlean.h: Add long comment to explain why we have to define certain
	symbols.
	(_NORMALIZE_): Define.
	(_WINNLS_): Drop definition and subsequent undef.
	(_WINNETWK_): Ditto.
	(_WINSVC_): Ditto.

2013-11-23  Eric Blake  <eblake@redhat.com>
2013-11-24 12:13:36 +00:00
Corinna Vinschen 6958a5e8f1 *** empty log message *** 2013-11-24 12:09:18 +00:00
Joel Sherrill f68a40cdf9 2013-11-23 Bryan Dunsmore <dunsmoreb@gmail.com>
* libc/include/wordexp.h (wordexp): Add restrict keyword.
	* libc/posix/wordexp.c (wordexp): Ditto.
2013-11-23 22:39:34 +00:00
Eric Blake 3a4ce7315f dup2: fix off-by-one crash
* dtable.cc (dup3): Fix off-by-one.
(find_unused_handle): Reduce time spent expanding during dup.
* syscalls.cc (setdtablesize): Report error on invalid value.
2013-11-23 13:51:53 +00:00
Corinna Vinschen 7a5be33eb5 * new-features.xml (ov-new1.7.26): Add new section. 2013-11-23 11:39:51 +00:00
Joel Sherrill 9cd69d84ef 2013-11-22 Bryan Dunsmore <dunsmoreb@gmail.com>
* libc/include/sys/time.h (gettimeofday): Add restrict keyword.
	(setitimer): Likewise.
	* libc/sys/rdos/gettod.c (gettimeofday): Likewise.
	* libc/sys/rtems/crt0.c (gettimeofday): Likewise.
2013-11-23 01:25:47 +00:00
Joel Sherrill 849fe25d0e 2013-11-22 Chirayu Desai <chirayudesai1@gmail.com>
* libc/include/sys/unistd.h (readlink): Add restrict keyword.
	(readlinkat): Ditto.
	(swab): Ditto.
	* libc/sys/rdos/readlink.c (readlink): Ditto.
	* libc/string/swab.c (swab): Ditto.
2013-11-22 22:39:51 +00:00
Joel Sherrill 2464ecbf64 2013-11-21 Daniel Ramirez <javamonn@gmail.com>
* libc/sys/linux/statvfs.c (statvfs): Added restrict keyword.
2013-11-22 01:17:42 +00:00
Joel Sherrill d0d3968f8f 2013-11-21 Joel Sherrill <joel.sherrill@oarcorp.com>
* libc/sys/rdos/chown.c, libc/sys/rdos/close.c, libc/sys/rdos/execve.c,
	libc/sys/rdos/fork.c, libc/sys/rdos/fstat.c, libc/sys/rdos/getpid.c,
	libc/sys/rdos/gettod.c, libc/sys/rdos/isatty.c, libc/sys/rdos/kill.c,
	libc/sys/rdos/link.c, libc/sys/rdos/lseek.c, libc/sys/rdos/open.c,
	libc/sys/rdos/rdos.h, libc/sys/rdos/read.c, libc/sys/rdos/readlink.c,
	libc/sys/rdos/sbrk.c, libc/sys/rdos/stat.c, libc/sys/rdos/symlink.c,
	libc/sys/rdos/times.c, libc/sys/rdos/unlink.c, libc/sys/rdos/wait.c,
	libc/sys/rdos/write.c: Convert from DOS to UNIX CRLF.
2013-11-21 19:27:17 +00:00
Joel Sherrill 9977fcbc42 2013-11-21 Julio Gutierrez <jgutleyva@gmail.com>
* libc/include/glob.h (glob): Add restrict keyword.
	* libc/posix/glob.c (glob): Ditto.
2013-11-21 17:04:57 +00:00
Joel Sherrill a7c3258311 2013-11-21 Joel Sherrill <joel.sherrill@oarcorp.com>
* libc/posix/readdir_r.c: Add restrict keyword.
	* libc/machine/spu/sys/dirent.h, libc/sys/decstation/sys/dirent.h,
	libc/sys/linux/sys/dirent.h, libc/sys/rtems/sys/dirent.h,
	libc/sys/sparc64/sys/dirent.h, libc/sys/sun4/sys/dirent.h,
	libc/sys/sysvi386/sys/dirent.h: Add readdir_r() prototype.
2013-11-21 16:44:39 +00:00
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