Skip to content

Commit f02d772

Browse files
committed
Merge tag 'newlib-4.5.0' into main
Newlib snapshot for 4.5.0
2 parents 1e40e22 + 5e5e51f commit f02d772

File tree

27 files changed

+503
-568
lines changed

27 files changed

+503
-568
lines changed

newlib/NEWS

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
*** Major changes in newlib version 4.5.0:
2+
3+
- major clean-up of libgloss build including merging a number of platforms
4+
into top-level Makefile (moxie, v850, i960, msp430, frv, i386, ...) and
5+
removal of dead platforms such as xc16x
6+
- strverscmp fixed for comparison of digit sequence with non-digits
7+
- proper locking added from amdgcn
8+
- numerous improvements to arc support including support of 16-entry
9+
register file
10+
- long double complex functions are now skipped if long double != double
11+
- support for POSIX.1-2024 added to features.h
12+
- arc64: port added for Synopsys Designware ARCv3 ISA
13+
- sys/xtensa removed and replaced by machine/xtensa and libgloss
14+
- fixes to powf
15+
- fixes for building with gcc-15
16+
117
*** Major changes in newlib version 4.4.0:
218

319
- long double support for i386, aarch64, and x86_64 added from FreeBSD

newlib/README

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
README for newlib-4.2.0 release
1+
README for newlib-4.5.0 release
22
(mostly cribbed from the README in the gdb-4.13 release)
33

44
This is `newlib', a simple ANSI C library, math library, and collection
@@ -20,8 +20,8 @@ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
2020
Unpacking and Installation -- quick overview
2121
==========================
2222

23-
When you unpack the newlib-4.2.0.tar.gz file, you'll find a directory
24-
called `newlib-4.2.0', which contains many files. Interesting ones:
23+
When you unpack the newlib-4.5.0.tar.gz file, you'll find a directory
24+
called `newlib-4.5.0', which contains many files. Interesting ones:
2525
COPYING* - License files for the sources
2626
README - A common overview of all GNU development projects
2727
configure - The build script for configuring the source tree
@@ -94,13 +94,13 @@ directory. If the path to `configure' would be the same as the
9494
argument to `--srcdir', you can leave out the `--srcdir' option; it
9595
will be assumed.)
9696

97-
For example, with version 4.2.0, you can build NEWLIB in a separate
97+
For example, with version 4.5.0, you can build NEWLIB in a separate
9898
directory for a Sun 4 cross m68k-aout environment like this:
9999

100-
cd newlib-4.2.0
100+
cd newlib-4.5.0
101101
mkdir ../newlib-m68k-aout
102102
cd ../newlib-m68k-aout
103-
../newlib-4.2.0/configure --host=sun4 --target=m68k-aout
103+
../newlib-4.5.0/configure --host=sun4 --target=m68k-aout
104104
make
105105

106106
When `configure' builds a configuration using a remote source
@@ -116,8 +116,8 @@ called `configure' (or one of its subdirectories).
116116

117117
The `Makefile' that `configure' generates in each source directory
118118
also runs recursively. If you type `make' in a source directory such
119-
as `newlib-4.2.0' (or in a separate configured directory configured with
120-
`--srcdir=PATH/newlib-4.2.0'), you will build all the required libraries.
119+
as `newlib-4.5.0' (or in a separate configured directory configured with
120+
`--srcdir=PATH/newlib-4.5.0'), you will build all the required libraries.
121121

122122
When you have multiple hosts or targets configured in separate
123123
directories, you can run `make' on them in parallel (for example, if
@@ -530,7 +530,7 @@ Reporting Bugs
530530

531531
The correct address for reporting bugs found in NEWLIB is
532532
"[email protected]". Please email all bug reports to that
533-
address. Please include the NEWLIB version number (e.g., newlib-4.2.0),
533+
address. Please include the NEWLIB version number (e.g., newlib-4.5.0),
534534
and how you configured it (e.g., "sun4 host and m68k-aout target").
535535
Since NEWLIB supports many different configurations, it is important
536536
that you be precise about this.

newlib/libc/include/sys/features.h

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ extern "C" {
8989
* _ISOC11_SOURCE or gcc -std=c11 or g++ -std=c++11
9090
* ISO C11
9191
*
92-
* _ISOC2x_SOURCE or gcc -std=c2x or -std=c23 or g++ -std=c++20
93-
* ISO C11
92+
* _ISOC23_SOURCE or _ISOC2X_SOURCE or gcc -std=c23 or g++ -std=c++20
93+
* ISO C23
9494
*
9595
* _ISOC23_SOURCE or gcc -std=c2x or -std=c2x or g++ -std=c++20
9696
* ISO C23
@@ -116,6 +116,13 @@ extern "C" {
116116
* Zephyr. ISO C + a small selection of other APIs.
117117
*/
118118

119+
/* Remap the old name _ISOC2X_SOURCE to _ISOC23_SOURCE. */
120+
#ifdef _ISOC2X_SOURCE
121+
# undef _ISOC2X_SOURCE
122+
# undef _ISOC23_SOURCE
123+
# define _ISOC23_SOURCE 1
124+
#endif
125+
119126
#ifdef _GNU_SOURCE
120127
#undef _ATFILE_SOURCE
121128
#define _ATFILE_SOURCE 1
@@ -258,10 +265,10 @@ extern "C" {
258265
* g++ -std=c++11 or newer (on by default since GCC 6), or with
259266
* _ISOC11_SOURCE.
260267
*
261-
* __ISO_C_VISIBLE >= 2023
262-
* ISO C23; enabled with gcc -std=c23 or -std=c2x or newer,
268+
* __ISO_C_VISIBLE >= 2020
269+
* ISO C23; enabled with gcc -std=c23 or newer,
263270
* g++ -std=c++20 or newer, or with
264-
* _ISOC2X_SOURCE or _ISOC23_SOURCE.
271+
* _ISOC23_SOURCE or _ISOC2x_SOURCE.
265272
*
266273
* __ATFILE_VISIBLE
267274
* "at" functions; enabled by default, with _ATFILE_SOURCE,
@@ -327,7 +334,7 @@ extern "C" {
327334
#define _ISOC23_SOURCE 1
328335
#endif
329336

330-
#if defined(_ISOC23_SOURCE) || \
337+
#if defined(_ISOC23_SOURCE) || \
331338
(__STDC_VERSION__ - 0) > 201710L || (__cplusplus - 0) >= 202002L
332339
#define __ISO_C_VISIBLE 2023
333340
#elif defined(_ISOC11_SOURCE) || \

newlib/libc/include/sys/sched.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,14 @@ _BEGIN_STD_C
3838
#define SCHED_SPORADIC 4
3939
#endif
4040

41+
#if __GNU_VISIBLE
42+
#define SCHED_IDLE 5
43+
#define SCHED_BATCH 6
44+
45+
/* Flag to drop realtime policies and negative nice values on fork(). */
46+
#define SCHED_RESET_ON_FORK 0x40000000
47+
#endif
48+
4149
/* Scheduling Parameters */
4250
/* Open Group Specifications Issue 6 */
4351

newlib/libc/include/time.h

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,6 @@ struct tm
9292
#define CLK_TCK CLOCKS_PER_SEC
9393
#endif
9494

95-
#define CLOCK_REALTIME ((clockid_t) 1)
96-
9795
/* Flag indicating time is "absolute" with respect to the clock
9896
associated with a time. Value 4 is historic. */
9997

@@ -123,16 +121,20 @@ struct itimerspec {
123121
#endif
124122

125123
#if __GNU_VISIBLE
126-
#define CLOCK_REALTIME_COARSE ((clockid_t) 0)
124+
#define CLOCK_REALTIME_COARSE (0)
127125
#endif
128126

127+
#define CLOCK_REALTIME (1)
128+
129+
/* Manifest Constants, P1003.4b/D8, p. 55 */
130+
129131
#if defined(_POSIX_CPUTIME)
130132

131133
/* When used in a clock or timer function call, this is interpreted as
132134
the identifier of the CPU_time clock associated with the PROCESS
133135
making the function call. */
134136

135-
#define CLOCK_PROCESS_CPUTIME_ID ((clockid_t) 2)
137+
#define CLOCK_PROCESS_CPUTIME_ID (2)
136138

137139
#endif
138140

@@ -142,7 +144,7 @@ struct itimerspec {
142144
the identifier of the CPU_time clock associated with the THREAD
143145
making the function call. */
144146

145-
#define CLOCK_THREAD_CPUTIME_ID ((clockid_t) 3)
147+
#define CLOCK_THREAD_CPUTIME_ID (3)
146148

147149
#endif
148150

@@ -152,21 +154,21 @@ struct itimerspec {
152154
* as a clock whose value cannot be set via clock_settime() and which
153155
* cannot have backward clock jumps. */
154156

155-
#define CLOCK_MONOTONIC ((clockid_t) 4)
157+
#define CLOCK_MONOTONIC (4)
156158

157159
#endif
158160

159161
#if __GNU_VISIBLE
160162

161-
#define CLOCK_MONOTONIC_RAW ((clockid_t) 5)
163+
#define CLOCK_MONOTONIC_RAW (5)
162164

163-
#define CLOCK_MONOTONIC_COARSE ((clockid_t) 6)
165+
#define CLOCK_MONOTONIC_COARSE (6)
164166

165-
#define CLOCK_BOOTTIME ((clockid_t) 7)
167+
#define CLOCK_BOOTTIME (7)
166168

167-
#define CLOCK_REALTIME_ALARM ((clockid_t) 8)
169+
#define CLOCK_REALTIME_ALARM (8)
168170

169-
#define CLOCK_BOOTTIME_ALARM ((clockid_t) 9)
171+
#define CLOCK_BOOTTIME_ALARM (9)
170172

171173
#endif
172174

newlib/libc/posix/engine.c

Lines changed: 44 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,13 @@ static char *pchar(int ch);
133133
== size_t nmatch, regmatch_t pmatch[], int eflags);
134134
*/
135135
static int /* 0 success, REG_NOMATCH failure */
136-
matcher(struct re_guts *g,
137-
char *string,
138-
size_t nmatch,
139-
regmatch_t pmatch[],
140-
int eflags)
136+
matcher(
137+
struct re_guts *g,
138+
char *string,
139+
size_t nmatch,
140+
regmatch_t pmatch[],
141+
int eflags
142+
)
141143
{
142144
char *endp;
143145
size_t i;
@@ -343,11 +345,13 @@ matcher(struct re_guts *g,
343345
== char *stop, sopno startst, sopno stopst);
344346
*/
345347
static char * /* == stop (success) always */
346-
dissect(struct match *m,
347-
char *start,
348-
char *stop,
349-
sopno startst,
350-
sopno stopst)
348+
dissect(
349+
struct match *m,
350+
char *start,
351+
char *stop,
352+
sopno startst,
353+
sopno stopst
354+
)
351355
{
352356
int i;
353357
sopno ss; /* start sop of current subRE */
@@ -533,12 +537,14 @@ dissect(struct match *m,
533537
== char *stop, sopno startst, sopno stopst, sopno lev);
534538
*/
535539
static char * /* == stop (success) or NULL (failure) */
536-
backref(struct match *m,
537-
char *start,
538-
char *stop,
539-
sopno startst,
540-
sopno stopst,
541-
sopno lev) /* PLUS nesting level */
540+
backref(
541+
struct match *m,
542+
char *start,
543+
char *stop,
544+
sopno startst,
545+
sopno stopst,
546+
sopno lev /* PLUS nesting level */
547+
)
542548
{
543549
int i;
544550
sopno ss; /* start sop of current subRE */
@@ -737,11 +743,13 @@ backref(struct match *m,
737743
== char *stop, sopno startst, sopno stopst);
738744
*/
739745
static char * /* where tentative match ended, or NULL */
740-
fast(struct match *m,
741-
char *start,
742-
char *stop,
743-
sopno startst,
744-
sopno stopst)
746+
fast(
747+
struct match *m,
748+
char *start,
749+
char *stop,
750+
sopno startst,
751+
sopno stopst
752+
)
745753
{
746754
states st = m->st;
747755
states fresh = m->fresh;
@@ -827,11 +835,13 @@ fast(struct match *m,
827835
== char *stop, sopno startst, sopno stopst);
828836
*/
829837
static char * /* where it ended */
830-
slow(struct match *m,
831-
char *start,
832-
char *stop,
833-
sopno startst,
834-
sopno stopst)
838+
slow(
839+
struct match *m,
840+
char *start,
841+
char *stop,
842+
sopno startst,
843+
sopno stopst
844+
)
835845
{
836846
states st = m->st;
837847
states empty = m->empty;
@@ -922,12 +932,14 @@ slow(struct match *m,
922932
== #define NNONCHAR (CODEMAX-CHAR_MAX)
923933
*/
924934
static states
925-
step(struct re_guts *g,
926-
sopno start, /* start state within strip */
927-
sopno stop, /* state after stop state within strip */
928-
states bef, /* states reachable before */
929-
int ch, /* character or NONCHAR code */
930-
states aft) /* states already known reachable after */
935+
step(
936+
struct re_guts *g,
937+
sopno start, /* start state within strip */
938+
sopno stop, /* state after stop state within strip */
939+
states bef, /* states reachable before */
940+
int ch, /* character or NONCHAR code */
941+
states aft /* states already known reachable after */
942+
)
931943
{
932944
cset *cs;
933945
sop s;

newlib/libc/posix/fnmatch.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,12 @@ fnmatch(const char *pattern, const char *string, int flags)
154154
}
155155

156156
static int
157-
rangematch(const char *pattern, char test, int flags, char **newp)
157+
rangematch(
158+
const char *pattern,
159+
char test,
160+
int flags,
161+
char **newp
162+
)
158163
{
159164
int negate, ok;
160165
char c, c2;

0 commit comments

Comments
 (0)