Commit Graph

17782 Commits

Author SHA1 Message Date
Corinna Vinschen 37738448a0 cygwin: Implement pthread_mutex_timedlock
- pthread_mutex::lock now takes a PLARGE_INTEGER timeout pointer
  and uses that in the call to cygwait.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-08-03 19:13:21 +02:00
Corinna Vinschen 68217c3178 cygwin: simplify pthread timedwait handling
- Introduce inline helper pthread_convert_abstime.  It converts
  an absolute timespec to a Windows LARGE_INTEGER timestamp,
  depending on the used clock.

- Use this function from pthread_cond_timedwait and semaphore::timedwait

- Merge semaphore::_wait and semaphore::_timedwait into single _wait
  method, taking a LARGER_INTEGER timestamp.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-08-03 19:08:31 +02:00
Corinna Vinschen a346a26790 cygwin/signal.h: Remove SI_QUEUE unimplemented comment
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-08-03 14:56:24 +02:00
Corinna Vinschen f41d402bd4 Revert "cygwin/signal.h: Remove SI_QUEUE unimplemented comment"
This reverts commit 54ed68a781.
2017-08-03 14:55:21 +02:00
Corinna Vinschen 54ed68a781 cygwin/signal.h: Remove SI_QUEUE unimplemented comment
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-08-03 14:54:02 +02:00
Aditya Upadhyay a1c2491f70 Importing wcstoumax inttypes method from FreeBSD. 2017-08-02 13:02:26 +02:00
Aditya Upadhyay 88abc0958b Importing wcstoimax inttypes method from FreeBSD. 2017-08-02 13:02:26 +02:00
Aditya Upadhyay fd1981a7df Importing strtoumax inttypes method from FreeBSD. 2017-08-02 13:02:26 +02:00
Aditya Upadhyay 910cc30c10 Importing strtoimax inttypes method from FreeBSD. 2017-08-02 13:02:26 +02:00
Yaakov Selkowitz 109a3a02a3 cygwin: add explicit_bzero, elf.h changes to release
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-08-02 04:38:01 -05:00
Yaakov Selkowitz 4aaec3cb88 Add elf.h to newlib
This is copied from musl (MIT license).  This is newer and more thorough
than that of FreeBSD currently shipped only on Cygwin.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-08-02 01:18:55 -05:00
Yaakov Selkowitz 2c83bc950f cygwin: Export explicit_bzero
This was added to newlib together with timingsafe_*cmp but never exported.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-08-02 01:09:49 -05:00
Corinna Vinschen 60546ae529 cygwin: generate Alt-Numpad characters independent of NumLock state
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-08-01 14:10:50 +02:00
Corinna Vinschen 8c4f86dd8e cygwin: add console issues to release notes
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-07-31 23:08:19 +02:00
Corinna Vinschen e6c75c1de1 cygwin: select: use UNICODE console functions
For historical reasons peek_console was calling the functions
PeekConsoleInputA and ReadConsoleInputA.  However, these functions are
not working correctly under at least codepage 65001 (UTF-8) on systems
prior to Windows 10.

Use PeekConsoleInputW and ReadConsoleInputW instead, which work
correctly under all systems and all codepages.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-07-31 22:57:06 +02:00
Corinna Vinschen 7b9bfb4136 cygwin: console: Use memset to clear an array
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-07-31 11:44:02 +02:00
Corinna Vinschen 9374e7f65d cygwin: clear screen using wide char function
FillConsoleOutputCharacterA doesn't work correctly in codepage 65001
(UTF-8).  Looks like the character conversion function from ascii char
to unicode char works incorrectly then.  Use FillConsoleOutputCharacterW
instead.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-07-31 11:43:35 +02:00
Aditya Upadhyay 0e0900cb40 Importing catanl long double complex method from NetBSD. 2017-07-28 20:36:09 +02:00
Aditya Upadhyay 124ccc500e Fixing HUGE_VALF to HUGE_VALL. 2017-07-28 20:30:30 +02:00
Sebastian Huber 7dad0e441a stdio: Fix make rule override
The Makefile.am contained two rules for the vfwscanf object.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2017-07-28 15:05:54 +02:00
Corinna Vinschen a7a7980f7b newlib: regenerate stdlib/Makefile.in
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-07-28 12:44:45 +02:00
Aditya Upadhyay 4b2fc8c55e Importing imaxdiv inttypes method from FreeBSD. 2017-07-28 12:23:10 +02:00
Aditya Upadhyay a785f0f69a Importing imaxabs inttypes method from FreeBSD. 2017-07-28 12:23:08 +02:00
Corinna Vinschen 8322a87c16 cygwin: Set __STDC_ISO_10646__ to Unicode 5.2 value
Now that XP is not supported anymore we can freely do that.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-07-26 11:49:58 +02:00
Corinna Vinschen 4bccfcca5b cygwin: add release notes for reparse point patches
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-07-24 23:04:34 +02:00
Corinna Vinschen 3e80cefb16 cygwin: unify reparse point checking code into single function
So far we had two functions checking the content of a reparse point,
readdir_check_reparse_point in fhandler_disk_file.cc for the sake of
readdir, and symlink_info::check_reparse_point for the sake of
generic path checking.

* Rename check_reparse_point_target helper to check_reparse_point_string
  and convert to static function.
* Create new check_reparse_point_target helper containing the core
  reparse point checking code
* Just call check_reparse_point_target from readdir_check_reparse_point
  and symlink_info::check_reparse_point and only perform the unique
  task in those functions.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-07-24 17:33:20 +02:00
Corinna Vinschen 42f1be581c cygwin: fix formatting in check_reparse_point_target
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-07-24 17:32:20 +02:00
Corinna Vinschen be1485191f cygwin: Fix resource leak in readdir reparse point handling
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-07-24 17:26:17 +02:00
Richard Earnshaw d6cac3e1da [arm] Fix strcpy for unified syntax on ARMv4t thumb.
ARMv4t does not support mov between two low registers.  Now we use
unified syntax mov instructions need converting to movs.
2017-07-21 11:23:27 +01:00
Tamar Christina cd26662dc5 Previous patch to support nosys.specs accidentally broke validation specs because ARM_RDI_MONITOR was never passed to the build rule for crt0.
This fixed the compile for nosys and validation specs
but nosys won't run because of existing limitations to
aarch64's syscalls.c, it requires semihosting to get
commandline arguments and heap info without having a
fallback method as ARM does.

Signed-off-by: Tamar Christina <tamar.christina@arm.com>
2017-07-21 10:41:37 +02:00
Jozef Lawrynowicz 25138cc2a6 MSP430: Define __BUFSIZ__ as 256 to prevent default of 1024 being used 2017-07-20 16:18:54 +02:00
Ian Tessier via newlib 4bce7ecbe1 arm: Update strcpy.c to use UAL syntax.
With this change the arm platform can now be fully compiled with Clang.

Tested by comparing the output with GCC 4.8.2, and Clang 4.0, using a
variety of arches, big/little endianness, and arm/thumb mode to verify
the generated assembly output matches between GCC vs Clang with UAL, and
also GCC with UAL vs GCC with non-UAL, for all preprocessor code blocks.

The only difference found is an extra nop at the end of the function
when compiled with GCC using armv7-a/thumb/little-endian/-O2 compared to
Clang. The nop is not emitted when compiled in big-endian mode.
2017-07-20 16:18:29 +02:00
Corinna Vinschen d2ae2f00b8 cygwin: add fflush fix to release notes
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-07-19 10:41:36 +02:00
Corinna Vinschen a674199fc9 cygwin: Bump DLL version to 2.8.3
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-07-19 10:38:15 +02:00
Corinna Vinschen 9cc89b0438 cygwin: Use errno instead of _impure_ptr->_errno
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-07-19 10:30:47 +02:00
Corinna Vinschen 78ade082fe Revert "errno: Stop using _impure_ptr->_errno completely"
This reverts commit 44b1746a41.

Bad idea.  _impure_ptr->_errno is used by newlib

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-07-19 10:28:39 +02:00
Tamar Christina bb12a1e587 Support building in a different directory than the default output directory by preserving DESTDIR value in recursive calls.
Signed-off-by: Tamar Christina <tamar.christina@arm.com>
2017-07-17 13:38:42 +02:00
Tamar Christina 13665a7c30 Fix link when nosys.specs is used to link
This patch fixes the issue where nosys.specs is used to link.
e.g. The use of crt0 without any support for semihosting requested.

The AArch64 crt0 was missing an #ifdef for the initialise_monitor_handles
which was causing the link to fail. Sorry for missing this before.
2017-07-14 10:36:32 +02:00
Corinna Vinschen e09a25c01b cygwin: 2.8.2: add missing release message text
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-07-12 10:49:10 +02:00
Yaakov Selkowitz 5fac663b29 cygwin: document signal.h fixes
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-07-12 03:24:50 -05:00
Sebastian Huber a3617d7bde Synchronize RTEMS <sys/bitset.h> with FreeBSD
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2017-07-12 08:04:45 +02:00
Corinna Vinschen 2d9c69da1c cygwin: export fls, flsl, flsll
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-07-11 10:31:44 +02:00
Yaakov Selkowitz 187066dcad Cygwin: fix guard on struct siginfo_t
Add line breaks to make it clearer that the struct packing applies to more
than one struct.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-07-10 07:53:26 -05:00
Sebastian Huber 870dc91de6 Add myself to OS Port Maintainers (RTEMS) 2017-07-10 09:48:50 +02:00
Sebastian Huber 1d49ce4d6b Synchronize RTEMS <sys/bitset.h> with FreeBSD
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2017-07-10 07:18:10 +02:00
David Macek bf61b38d98 Rename __in and __out in headers to avoid collision with Windows APIs
* string.h: Local variables in expansion of strdupa and strndupa
* sys/wait.h: Fields in anonymous union in expansion of __wait_status_to_int
2017-07-07 16:37:44 +02:00
Brian Inglis 74dd44c0de fix URL shortcuts launch with cygstart, create shortcuts directly in SM/Programs/Cygwin 2017-07-06 18:36:38 +02:00
Tamar Christina 9eafa44d23 Replace the perl character classes with POSIX ones to fix the build when sed is a BSD sed instead of GNU.
Signed-off-by: Tamar Christina <tamar.christina@arm.com>
2017-07-06 18:05:56 +02:00
Brian Inglis cff8513220 fix cygwin-doc postinstall/preremove no SMPrograms/Cygwin dir 2017-07-06 10:01:54 +02:00
Tamar Christina ddb6f8a02a Add support for Semihosting v2 support for AArch64 in libgloss.
Semihosting v2 changes are documented here:
https://developer.arm.com/docs/100863/latest/

The biggest change is the addition of an extensions mechanism
to add more extensions in the future.

Signed-off-by: Tamar Christina <tamar.christina@arm.com>
2017-07-05 14:41:27 +02:00