summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Correct prototypes of pthread_mutex_getprioceiling() and pthread_setschedparam()Joel Sherrill2018-03-151-2/+2
|
* [arm] Fix syscalls.c for newlib embedded syscalls buildsRichard Earnshaw2018-03-151-119/+126
| | | | | | | | | | | | | | | | | | Newlib has a build configuration where syscalls can be directly embedded in the newlib library rather than relying on libgloss. This configuration was broken recently by an update to the libgloss support for Arm that was not propagated to the syscalls interface in newlib itself. This patch restores the build. It's essentially a copy of https://sourceware.org/ml/newlib/2018/msg00128.html but there are some other minor cleanups and changes that I've made at the same time. None of those cleanups affect functionality. The prototypes of the following functions have been updated: _link, _sbrk, _getpid, _write, _swiwrite, _lseek, _swilseek, _read and _swiread. Signed-off-by: Richard Earnshaw <Richard.Earnshaw@arm.com>
* ssp: fix wchar.h with -std=c99Yaakov Selkowitz2018-03-141-2/+2
| | | | | | https://sourceware.org/ml/newlib/2018/msg00261.html Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
* Fix alloc_align and alloc_size macros for multiple argumentsYaakov Selkowitz2018-03-142-4/+4
| | | | | | | | https://sourceware.org/ml/newlib/2018/msg00263.html This is a follow-up to commit 4564b30f331a067e71b25308ac7c8a85ceb4b122. Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
* ctype: align size of category bit fields to small targets needsCorinna Vinschen2018-03-141-2/+2
| | | | | | | | | | | | | | | | E.g. arm ABI requires -fshort-enums for bare-metal toolchains. Given there are only 29 category enums, the compiler chooses an 8 bit enum type, so a size of 11 bits for the bitfield leads to a compile time error: error: width of 'cat' exceeds its type enum category cat: 11; ^~~ Fix this by aligning the size of the category members to byte borders. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Revert "ctype: align size of category bit fields to small targets needs"Corinna Vinschen2018-03-143-214/+136
| | | | | | This reverts commit e98d3eb3eb9b6abd897e102031a14b7057641a65. It has accidentally included some work in progress.
* fix/enhance Unicode table generation scriptsThomas Wolff2018-03-142-18/+53
| | | | | | | | | | | Scripts do not try to acquire Unicode data by best-effort magic anymore. Options supported: -h for help -i to copy Unicode data from /usr/share/unicode/ucd first -u to download Unicode data from unicode.org first If (despite of -i or -u if given) the necessary Unicode files are not available locally, table generation is skipped, but no error code is returned, so not to obstruct the build process if called from a Makefile.
* ctype: align size of category bit fields to small targets needsCorinna Vinschen2018-03-143-136/+214
| | | | | | | | | | | | | | | | E.g. arm ABI requires -fshort-enums for bare-metal toolchains. Given there are only 29 category enums, the compiler chooses an 8 bit enum type, so a size of 11 bits for the bitfield leads to a compile time error: error: width of 'cat' exceeds its type enum category cat: 11; ^~~ Fix this by aligning the size of the category members to byte borders. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* towctrans_l: Always return a value from helper functionsCorinna Vinschen2018-03-131-19/+49
| | | | | | | | | | | | touupper and toulower didn't return a value in all cases. Worse, this only broke Cygwin when building without optimization for debug purposes. Why GCC neglects to notice this is a mystery. While at it, fix formatting. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* rtems/.../dirent.h: Add alphasort() prototypeJoel Sherrill2018-03-131-0/+1
|
* Correct alloc_size annotation on reallocarray()Jon Turney2018-03-131-2/+1
| | | | Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
* Cygwin: mark muto object as NO_COPYCorinna Vinschen2018-03-121-1/+1
| | | | | | muto in smallprint.cc is missing a NO_COPY. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: AF_UNIX: store per-socket info in shared memoryCorinna Vinschen2018-03-124-80/+238
| | | | | | | | | | | | | | | Per-socket info in fhandler isn't correctly shared between multiple instances of th same descriptor. Implement a basic shared info which is shared between all instances of a socket. This also requires to move the fhandler_socket status bits into fhandler_socket_wsock since the data is moved to the shared region for AF_UNIX sockets. Also, drop backing file requirement for socketpair server socket. This will be handled differently in recvmsg/sendmsg. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* make target for explicit Unicode data tables generationThomas Wolff2018-03-121-0/+9
| | | | | Run 'make unidata' in newlib target directory to generate Unicode data tables for libc functions wcwidth, tow* and isw*.
* character data generationThomas Wolff2018-03-123-0/+237
|
* use generated character dataThomas Wolff2018-03-1238-2681/+439
| | | | | | | | | | | The tow* functions use an included case conversion table which can be generated from Unicode data. The isw* functions use a character categories table (provided by categories.c) which can be generated from Unicode data. Delegation between current-locale and specific-locale-dependent functions was reverted towards the generic locale-dependent functions (*_l.c); this is however only relevant on systems with non-Unicode wide character locales, thus not on Cygwin.
* generated character category data, Unicode 10.0Thomas Wolff2018-03-122-0/+2115
| | | | | | Table categories.t and tag enumeration categories.cat provide character class data for most of the isw* functions. These data are generated from Unicode data.
* generated case conversion data, Unicode 10.0Thomas Wolff2018-03-121-0/+304
| | | | | | Table caseconv.t provides case conversion data for the tow* functions, especially towupper and towlower. These data are generated from Unicode data.
* width data generationThomas Wolff2018-03-125-0/+1388
|
* use generated width dataThomas Wolff2018-03-121-126/+24
|
* generated width data, Unicode 10.0Thomas Wolff2018-03-123-0/+201
| | | | | These tables provide character width properties for use by the wcwidth/wcswidth functions. They are generated from Unicode.
* Cygwin: AF_UNIX: fix up thread parameter block allocationCorinna Vinschen2018-03-111-3/+4
| | | | | | | * don't abort on failing allocation, just return with error * make sure the allocation is restricted to a single process Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: AF_UNIX: use get_unique_id to create pipe nameCorinna Vinschen2018-03-111-1/+1
| | | | | | | It's the same as get_plain_ino in this case, but it's cleaner and easier to understand. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: AF_UNIX: fix dupCorinna Vinschen2018-03-101-1/+15
| | | | | | | Reorder so fhandler_socket::dup is called first. Add missing duplication of backing_file_handle. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: AF_UNIX: Add fixup_after_exec methodCorinna Vinschen2018-03-102-2/+10
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: AF_UNIX: fix creating abstract socket symlink nameCorinna Vinschen2018-03-101-1/+2
| | | | | | | Add missing NUL termination when creating symlink representing abstract socket. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: don't skip O_TMPFILE files in readdirCorinna Vinschen2018-03-091-15/+9
| | | | | | | | | | Bad idea. A file hidden from directory listings is not seen by rm either, so it never calls unlink for the file and a recursive removal of the parent directory fails with "directory not empty". Fix comments accordingly. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: AF_UNIX: Implemant socketpairCorinna Vinschen2018-03-092-21/+67
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: fix socketpair prototypeCorinna Vinschen2018-03-092-4/+4
| | | | | | Last parameter is a vector of 2 ints, not a pointer to int Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* describe new locale modifier @cjkwide for user guideThomas Wolff2018-03-081-0/+13
|
* Cygwin: AF_UNIX: implement getsockopt SO_RCVBUF/SO_SNDBUFCorinna Vinschen2018-03-071-0/+10
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: AF_UNIX: define AF_UNIX_CONNECT_TIMEOUTCorinna Vinschen2018-03-071-2/+5
| | | | | | | Use macro AF_UNIX_CONNECT_TIMEOUT instead of numerical constant for connect timeout. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: Define FSCTL_PIPE_FLUSHCorinna Vinschen2018-03-071-0/+3
| | | | | | This fsctl might come in handy at one point... Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: AF_UNIX: Implement read, readv, recvfrom, write, writev, sendtoCorinna Vinschen2018-03-071-20/+88
| | | | | | All of these functions just call recvfrom/sendmsg which are still TODO Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: reorder read/write calls in fhandler_socket_unixCorinna Vinschen2018-03-071-4/+5
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: AF_UNIX: fix accept behaviourCorinna Vinschen2018-03-071-15/+37
| | | | | | | | | * Use correct cygwait/WFSO invocation to not die on cancel and signals uncontrolled. * Manage io handles under io_lock. * Copy peer address to user space under SEH to avoid a resource leak. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: AF_UNIX: make sure connect wait thread is cleanly interruptibleCorinna Vinschen2018-03-072-8/+49
| | | | | | | | | | | | | | Using TerminateThread potentially leaks resources. In our case, the connect wait thread may be forcefully terminated after having successfully opened a client side pipe handle. If this occurs, we have a stale pipe server instance, so the pipe will never be closed as long as the process lives. Avoid this by changing the npfs handle to non-blocking, so we can wait on a termination event object from inside the thread itself and cleanly exit from the thread instead of terminating. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: AF_UNIX: some pipe errors may have multiple status codesCorinna Vinschen2018-03-071-3/+26
| | | | | | | | Depending on the exact circumstances, some erros are indicated by different status codes. Add helper macros to handle them together. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: AF_UNIX: fix SEGV when sending an empty socket name from connectCorinna Vinschen2018-03-071-2/+5
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: AF_UNIX: fix creation of npfs handleCorinna Vinschen2018-03-073-25/+23
| | | | | | | | | The handle to the device is never needed. As the name impies, FSCTL_PIPE_WAIT works on the file system, not on the device level. Drop opening the device and make sure to open only one handle to NPFS. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: AF_UNIX: Add create_event helper and use throughoutCorinna Vinschen2018-03-071-15/+25
| | | | | | Minimize overhead in creating a nameless event object. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: AF_UNIX: fix comments and move a macroCorinna Vinschen2018-03-071-6/+3
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: AF_UNIX: Implement listen, accept4, connect, and othersCorinna Vinschen2018-03-063-65/+774
| | | | | | | | | | | * Implement helper functions * Improve bind * Implement setting blocking, ioctl(FIONBIO), fcntl(F_SETFL) * Implement close_on_exec and fixup_after_fork * Allow overriding sun_path and peer_sun_path * Improve comments Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: AF_UNIX: fix a couple of thinkos and typosCorinna Vinschen2018-03-061-26/+18
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: AF_UNIX: create/open pipes relativ to NPFS rootdir handleCorinna Vinschen2018-03-062-22/+68
| | | | | | Only store and manipulate pipe basename. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: AF_UNIX: initialize rmem/wmem to 256K and use in pipe creationCorinna Vinschen2018-03-061-4/+4
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: ntdll.h: Add some missing pipe-related definitionsCorinna Vinschen2018-03-061-2/+25
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: sys/socket.h: define MSG_CMSG_CLOEXECCorinna Vinschen2018-03-061-0/+3
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: export hires counter ntodCorinna Vinschen2018-03-061-0/+1
| | | | | | Needed it new AF_UNIX socket code Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* RTEMS: Use int for _CLOCKID_T_Sebastian Huber2018-03-061-0/+3
| | | | | | | | | Linux and FreeBSD use int as well. In addition, this fixes an Ada incompatiblity problem on 64-bit targets. See also GCC: gcc/ada/libgnarl/s-osinte__rtems.ads Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>