Age | Commit message (Collapse) | Author | Files | Lines |
|
Implement abstract interface for MIPS, including unified hosting
interface (UHI).
Signed-off-by: Jovan Dmitrović <jovan.dmitrovic@htecgroup.com>
|
|
for aarch64-pc-cygwin
Signed-off-by: Radek Bartoň <radek.barton@microsoft.com>
|
|
Updated the guard for stdlib functions to use the POSIX Issue 8 guard
added in 2024.
|
|
Updated the guard for pthread functions added in POSIX Issue 8
to use the POSIX Issue 8 guard added in 2024.
These functions are:
pthread_mutex_clocklock()
pthread_cond_clockwait()
pthread_rwlock_clockrdlock()
pthread_rwlock_clockwrlock()
|
|
Added timespec_get() prototype to libc/include/time.h
and removed the prototype from winsup/cygwin/include/cygwin/time.h
|
|
The define '_REENT_INIT' for the case '!_REENT_SMALL' was missing an initializing value for 'int _h_errno'.
If code uses the _REENT_INIT() macro to preset a variable of type struct _reent, this led to an issue when compiling with -Wmissing-field-initializers.
|
|
Add type posix_tnode. Change certain uses of "void" to "posix_tnode" in
both the prototypes and definitions of functions associated with <search.h>.
(Necessary changes to Cygwin's /usr/include/search.h will follow in a
separate patch to be sent to cygwin-patches.)
Reported-by: Collin Funk <collin.funk1@gmail.com>
Addresses: https://cygwin.com/pipermail/cygwin/2025-April/258032.html
Signed-off-by: Mark Geisert <mark@maxrnd.com>
Fixes: ec98d19a08c2 "* wininfo.h (wininfo::timer_active): Delete."
|
|
Addresses: https://sourceware.org/pipermail/cygwin-patches/2025q2/013644.html
Fixes: 3e8a7eb1a868 ("sys/unistd.h: fix definition of setproctitle_init")
Reported-by: Brian Inglis <Brian.Inglis@SystematicSW.ab.ca>
Co-authored-by: Corinna Vinschen <corinna@vinschen.de>
Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp>
|
|
Following the changes from Austin Group bug
https://www.austingroupbugs.net/view.php?id=1741, getlocalename_l()
now allows to specify LC_ALL and returns a setlocale-conmpatible
LC_ALL locale string.
Consequentially we have to raise the size of _reent::_getlocalename_l_buf
so there's enough space for the LC_ALL locale string.
Guard all different definitions and usages of _getlocalename_l_buf
in reent.h with _MB_CAPABLE.
Link: https://www.austingroupbugs.net/view.php?id=1741
Fixes: 71511d4ac868 ("getlocalename_l: implement per SUS Base Specifications Issue 8 draft")
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|
|
setproctitle_init is defined in c2x manner, omitting names for
the unused parameters. This can result in warnings or errors
on certain compiler versions:
clang 8:
error: parameter name omitted
clang 15:
warning: omitting the parameter name in a function definition is a C2x
extension [-Wc2x-extensions]
gcc -Wsystem-headers -pedantic -std=c17:
warning: ISO C does not support omitting parameter names in function
definitions before C2X [-Wpedantic]
Add parameters to avoid above warning and errors.
Fixes: 2e7f7b96e5f1 ("Cygwin: implement setproctitle")
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|
|
https://pubs.opengroup.org/onlinepubs/9799919799/functions/lseek.html
Signed-off-by: Christian Franke <christian.franke@t-online.de>
|
|
Declare posix_close, a new function defined by POSIX-1.2024, per
https://pubs.opengroup.org/onlinepubs/9799919799/functions/posix_close.html
Define POSIX_CLOSE_RESTART.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|
|
posix_devctl is now part of POSIX-1.2024, thus the requirement to
define _POSIX_26_C_SOURCE has been dropped.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|
|
POSIX®.1-2024 now defines posix_spawn_file_actions_addchdir and
posix_spawn_file_actions_addfchdir. Add these interfaces to spawn.h,
guarded as POSIX 202405 symbols.
Cygwin-only: Export them as aliases of the *_np counterparts. Bump
API minor.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|
|
Add SCHED_RESET_ON_FORK to <sys/sched.h>. If this flag is set, SCHED_FIFO
and SCHED_RR are reset to SCHED_OTHER and negative nice values are reset to
zero in each child process created with fork(2).
Signed-off-by: Christian Franke <christian.franke@t-online.de>
|
|
Add SCHED_BATCH to <sys/sched.h>. SCHED_BATCH is similar to SCHED_OTHER,
except that the nice value is mapped to a one step lower Windows priority.
Rework the mapping functions to ease the addition of this functionality.
Signed-off-by: Christian Franke <christian.franke@t-online.de>
|
|
Add SCHED_IDLE to <sys/sched.h>. If SCHED_IDLE is selected, preserve
the nice value and set the Windows priority to IDLE_PRIORITY_CLASS.
Signed-off-by: Christian Franke <christian.franke@t-online.de>
|
|
The POSIX specification defines these as constants. The cast is
unnecessary. This brings newlib inline with the equivalent FreeBSD
defines.
|
|
_ISOC2x_SOURCE to _ISOC23_SOURCE
Signed-off-by: Lenard Mollenkopf <newlib@lenardmollenkopf.de>
|
|
|
|
when a C++ source file include this header file, it would build fail.
Signed-off-by: yang.zhang <zhangyang01@kylinos.cn>
|
|
Synopsys ARCv3 ISA includes 32-bit ARC HS5x targets and
64-bit ARC HS6x targets. Both CPU families are placed
in "arc64" subdirectories as it done for GCC port.
Target name arc64 is used for historical reasons and
Synopsys ARCv3 baremetal toolchains contain multilib
configurations both for 32-bit and 64-bit families.
arc32 target name is reserved for 32-bit ARC HS5x
targets in case of non-multilib 32-bit builds.
Note that libgloss libraries for ARCv3 are compatible with
libgloss for ARCv1/2. Thus, Makefile.inc for libgloss uses
sources from libgloss/arc directory except crtX.S files.
Co-authored-by: Shahab Vahedi <list@vahedi.org>
Co-authored-by: Claudiu Zissulescu <claziss@gmail.com>
Co-authored-by: Bruno Mauricio <brunoasmauricio@gmail.com>
Co-authored-by: Luis Silva <luis.m.silva99@hotmail.com>
Signed-off-by: Yuriy Kolerov <ykolerov@synopsys.com>
|
|
Fixed glob() function to return GLOB_NOMATCH if pattern does
not match any existing pathname (and GLOB_NOCHECK was not set in flags).
|
|
|
|
Reverts 1339af44679aee0895fe311cfad89d38cfc2b919
|
|
This avoids a `__utoa undefined' warning when building newlib
for Cygwin. We still need to export the symbols for backward
compatibility.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|
|
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|
|
TBD: Align _GNU_SOURCE, too?
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|
|
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|
|
https://gcc.gnu.org/pipermail/gcc-patches/2023-September/631525.html
brings c_atomic and cxx_atomic definitions into GCC.
This patch makes atomics type detection correct for GCC.
https://github.com/freebsd/freebsd-src/commit/680f40f38343de118d5b973129683804e496faaf
|
|
This file was from a specific older FreeBSD version. There have been
multiple changes to this file with FreeBSD 14 including breaking
changes to the file. Including this file as part of newlib results
in not always having the correct version of sys/tree.h for any
specific software. RTEMS will manage its use of this file outside
of newlib.
|
|
|
|
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
|
|
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.
Discussed with: pfg
MFC After: 3 days
Sponsored by: Netflix
|
|
Use of stdatomic.h is undefined in C++, even the C++ 2020 standard does not
list stdatomic.h as a C library header supported by the language. More,
there are some subtle differences between the <atomic> C++ header, and
C11+ stdatomic.h provided features.
Nonetheless, it is a quality of the implementation aspect, so let mis-users
mis-use stdatomic.h as they want, by making a compat shim for _Bool.
PR: 262683
Reported by: yuri
Reviewed by: dim, emaste
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D34686
|
|
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.
The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.
|
|
|
|
These should not be in a Cygewin conditional.
|
|
The "longjmp" expects the "setjmp" to save the r58/r59 registers,
if there is any. With this change they are saved accordingly.
Checked for regression with running GCC's DejaGnu tests:
$ runtest execute.exp=pr56982.c dg-torture.exp=pr48542.c
Signed-off-by: Shahab Vahedi <shahab@synopsys.com>
|
|
The cpp directive "elifdef" is only available in very recent GCC versions.
This should be able to compile on older toolchains in C99 mode.`
|
|
|
|
These errno values are no longer used by Cygwin.
Signed-off-by: Christian Franke <christian.franke@t-online.de>
|
|
The new _MB_CAPABALE-only _misc_reent member getlocalename_l_buf was
incorrectly initialized in the _REENT_INIT_MISC macro, so the build
failed for _REENT_SMALL targets, independet of the _MB_CAPABALE setting.
Fixes: 71511d4ac868 ("getlocalename_l: implement per SUS Base Specifications Issue 8 draft")
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|
|
Make sure to create commandline according to setting of setproctitle.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|
|
These were only necessary until we dropped 32 bit Cygwin.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|
|
- Basically maintain a hidden DIR* inside fhandlers.
- lseek has to be tweaked to allow basic seeking on the directory
descriptor.
- the current implementation does not keep the dir positions
between duplicated descriptor in sync. In fact, every descriptor
keeps its own copy of the DIR* and after dup/fork/exec, the
directory position is reset to 0, i. e., to the start of the
directory, as if rewinddir() has been called on the new descriptors.
While this behaviour isn't yet covered by the Issue 8 draft,
a bug report along these lines exists and will probably be
picked up for TC1.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|
|
#include <locale.h>
const char *getlocalename_l(int category, locale_t locobj);
Most notably, we need a per-thread space to store the string
returned if locobj is LC_GLOBAL_LOCALE. No errors are defined
for getlocalename_l. So we can't use buffer allocation which
might lead to an ENOMEM error. We have to use a "static" buffer
in the per-thread state.
Note that the feature test macro in locale.h is not quite correct.
This needs to be fixed as soon as the
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|
|
These functions are non-standard and not exported by Cygwin.
Signed-off-by: Christian Franke <christian.franke@t-online.de>
|
|
If specified, use __builtin_dynamic_object_size() instead of
__builtin_object_size() if supported (GCC 12.0 or later).
This enables buffer overflow checks if the buffer size is non-const
but known during runtime.
Use new macro __ssp_bos_known() instead of the (bos(p) != (size_t)-1)
checks. The latter is no longer a compile time constant in all cases.
This avoids the generation of unused code.
Signed-off-by: Christian Franke <christian.franke@t-online.de>
|
|
This function closes or sets the close-on-exec flag for a specified
range of file descriptors. It is available on FreeBSD and Linux.
Signed-off-by: Christian Franke <christian.franke@t-online.de>
|