-
Notifications
You must be signed in to change notification settings - Fork 0
/
psx.patch
614 lines (576 loc) · 19.1 KB
/
psx.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
diff -aur newlib-4.3.0.20230120-orig/libgloss/mips/Makefile.in newlib-4.3.0.20230120-changed/libgloss/mips/Makefile.in
--- newlib-4.3.0.20230120-orig/libgloss/mips/Makefile.in 2023-01-20 13:01:54.000000000 -0800
+++ newlib-4.3.0.20230120-changed/libgloss/mips/Makefile.in 2023-10-03 22:47:52.144574344 -0700
@@ -76,6 +76,7 @@
JMR3904OBJS = jmr3904-io.o @MIPS_PART_SPECIFIC_OBJ@ ${GENOBJS} ${GENOBJS2}
CFEOBJS = cfe.o cfe_api.o cfe_mem.o @MIPS_PART_SPECIFIC_OBJ@ ${GENOBJS} ${GENOBJS2}
CYGMONOBJS = open.o close.o cygmon.o @MIPS_PART_SPECIFIC_OBJ@ ${GENOBJS}
+PSXOBJS = psx.o syscalls.o getpid.o kill.o putnum.o psx-bonus.o psx-printf.o
# Nullmon cannot support read and write, but the test cases pull them in via libs
NULLMONOBJS = nullmon.o @MIPS_PART_SPECIFIC_OBJ@ ${GENOBJS}
@@ -140,6 +141,10 @@
${AR} ${ARFLAGS} $@ $(CFEOBJS)
${RANLIB} $@
+libpsxsys.a: $(PSXOBJS)
+ ${AR} ${ARFLAGS} $@ $(PSXOBJS)
+ ${RANLIB} $@
+
# nullmon.a , This is what you want if you want crt0 but NO mon services
# Supports GDB sim testing, board bringups, ICE operation.
libnullmon.a: $(NULLMONOBJS)
Only in newlib-4.3.0.20230120-changed/libgloss/mips: psx-bonus.c
Only in newlib-4.3.0.20230120-changed/libgloss/mips: psx.c
Only in newlib-4.3.0.20230120-changed/libgloss/mips: psx.ld
Only in newlib-4.3.0.20230120-changed/libgloss/mips: psx-printf.S
diff -aur newlib-4.3.0.20230120-orig/newlib/libc/ctype/tolower.c newlib-4.3.0.20230120-changed/newlib/libc/ctype/tolower.c
--- newlib-4.3.0.20230120-orig/newlib/libc/ctype/tolower.c 2023-01-20 13:01:54.000000000 -0800
+++ newlib-4.3.0.20230120-changed/newlib/libc/ctype/tolower.c 2023-10-03 22:45:18.891828787 -0700
@@ -60,6 +60,7 @@
#include <wchar.h>
#endif
+#if 0
#undef tolower
int
tolower (int c)
@@ -80,3 +81,4 @@
return isupper(c) ? (c) - 'A' + 'a' : c;
#endif
}
+#endif
diff -aur newlib-4.3.0.20230120-orig/newlib/libc/ctype/toupper.c newlib-4.3.0.20230120-changed/newlib/libc/ctype/toupper.c
--- newlib-4.3.0.20230120-orig/newlib/libc/ctype/toupper.c 2023-01-20 13:01:54.000000000 -0800
+++ newlib-4.3.0.20230120-changed/newlib/libc/ctype/toupper.c 2023-10-03 22:45:18.891828787 -0700
@@ -61,6 +61,7 @@
#endif
#undef toupper
+#if 0
int
toupper (int c)
{
@@ -80,3 +81,4 @@
return islower (c) ? c - 'a' + 'A' : c;
#endif
}
+#endif
diff -aur newlib-4.3.0.20230120-orig/newlib/libc/include/machine/setjmp.h newlib-4.3.0.20230120-changed/newlib/libc/include/machine/setjmp.h
--- newlib-4.3.0.20230120-orig/newlib/libc/include/machine/setjmp.h 2023-01-20 13:01:54.000000000 -0800
+++ newlib-4.3.0.20230120-changed/newlib/libc/include/machine/setjmp.h 2023-10-03 22:45:18.891828787 -0700
@@ -132,7 +132,7 @@
# define _JBTYPE long long
# endif
# ifdef __mips_soft_float
-# define _JBLEN 11
+# define _JBLEN 12
# else
# define _JBLEN 23
# endif
diff -aur newlib-4.3.0.20230120-orig/newlib/libc/machine/mips/setjmp.S newlib-4.3.0.20230120-changed/newlib/libc/machine/mips/setjmp.S
--- newlib-4.3.0.20230120-orig/newlib/libc/machine/mips/setjmp.S 2023-01-20 13:01:54.000000000 -0800
+++ newlib-4.3.0.20230120-changed/newlib/libc/machine/mips/setjmp.S 2023-10-03 22:45:18.891828787 -0700
@@ -119,6 +119,7 @@
#define GPOFF(INDEX) (INDEX * BYTES_PER_WORD)
#define FPOFF(INDEX) ((INDEX + NUM_GPRS_SAVED) * BYTES_PER_WORD)
+#if 0
/* int setjmp (jmp_buf); */
.globl setjmp
.ent setjmp
@@ -157,3 +158,4 @@
j $31
.end longjmp
+#endif
diff -aur newlib-4.3.0.20230120-orig/newlib/libc/machine/mips/strcmp.S newlib-4.3.0.20230120-changed/newlib/libc/machine/mips/strcmp.S
--- newlib-4.3.0.20230120-orig/newlib/libc/machine/mips/strcmp.S 2023-01-20 13:01:54.000000000 -0800
+++ newlib-4.3.0.20230120-changed/newlib/libc/machine/mips/strcmp.S 2023-10-03 22:47:27.972458059 -0700
@@ -78,7 +78,7 @@
#ifndef STRCMP_NAME
# define STRCMP_NAME strcmp
#endif
-
+#if 0
#ifdef ANDROID_CHANGES
LEAF(STRCMP_NAME, 0)
#else
@@ -250,3 +250,4 @@
.set reorder
END(STRCMP_NAME)
+#endif
diff -aur newlib-4.3.0.20230120-orig/newlib/libc/machine/mips/strlen.c newlib-4.3.0.20230120-changed/newlib/libc/machine/mips/strlen.c
--- newlib-4.3.0.20230120-orig/newlib/libc/machine/mips/strlen.c 2023-01-20 13:01:54.000000000 -0800
+++ newlib-4.3.0.20230120-changed/newlib/libc/machine/mips/strlen.c 2023-10-03 22:45:18.895828806 -0700
@@ -20,6 +20,7 @@
/* MIPS16 needs to come first. */
+#if 0
#if defined(__mips16)
size_t
strlen (const char *str)
@@ -72,3 +73,4 @@
" .set macro\n"
" .set reorder\n");
#endif
+#endif
diff -aur newlib-4.3.0.20230120-orig/newlib/libc/machine/mips/strncpy.c newlib-4.3.0.20230120-changed/newlib/libc/machine/mips/strncpy.c
--- newlib-4.3.0.20230120-orig/newlib/libc/machine/mips/strncpy.c 2023-01-20 13:01:54.000000000 -0800
+++ newlib-4.3.0.20230120-changed/newlib/libc/machine/mips/strncpy.c 2023-10-03 22:45:18.895828806 -0700
@@ -42,7 +42,7 @@
#error "UNROLL_FACTOR must be 2 or 4"
#endif
#endif
-
+#if 0
char *
strncpy (char *dst0, const char *src0, size_t count)
{
@@ -248,3 +248,4 @@
return dst0;
#endif
}
+#endif
diff -aur newlib-4.3.0.20230120-orig/newlib/libc/search/bsearch.c newlib-4.3.0.20230120-changed/newlib/libc/search/bsearch.c
--- newlib-4.3.0.20230120-orig/newlib/libc/search/bsearch.c 2023-01-20 13:01:54.000000000 -0800
+++ newlib-4.3.0.20230120-changed/newlib/libc/search/bsearch.c 2023-10-03 22:45:18.895828806 -0700
@@ -54,7 +54,7 @@
*/
#include <stdlib.h>
-
+#if 0
void *
bsearch (const void *key,
const void *base,
@@ -88,4 +88,4 @@
return NULL;
}
-
+#endif
diff -aur newlib-4.3.0.20230120-orig/newlib/libc/stdio/findfp.c newlib-4.3.0.20230120-changed/newlib/libc/stdio/findfp.c
--- newlib-4.3.0.20230120-orig/newlib/libc/stdio/findfp.c 2023-01-20 13:01:54.000000000 -0800
+++ newlib-4.3.0.20230120-changed/newlib/libc/stdio/findfp.c 2023-10-03 22:45:18.895828806 -0700
@@ -125,7 +125,7 @@
{
/* POSIX requires stderr to be opened for reading and writing, even
when the underlying fd 2 is write-only. */
- std (ptr, __SRW | __SNBF, 2);
+ std (ptr, __SRW | __SNBF, 1);
}
struct glue_with_file {
diff -aur newlib-4.3.0.20230120-orig/newlib/libc/stdio/getchar.c newlib-4.3.0.20230120-changed/newlib/libc/stdio/getchar.c
--- newlib-4.3.0.20230120-orig/newlib/libc/stdio/getchar.c 2023-01-20 13:01:54.000000000 -0800
+++ newlib-4.3.0.20230120-changed/newlib/libc/stdio/getchar.c 2023-10-03 22:45:18.895828806 -0700
@@ -79,7 +79,7 @@
}
#ifndef _REENT_ONLY
-
+#if 0
int
getchar (void)
{
@@ -89,5 +89,5 @@
_REENT_SMALL_CHECK_INIT (reent);
return _getc_r (reent, _stdin_r (reent));
}
-
+#endif
#endif
diff -aur newlib-4.3.0.20230120-orig/newlib/libc/stdio/gets.c newlib-4.3.0.20230120-changed/newlib/libc/stdio/gets.c
--- newlib-4.3.0.20230120-orig/newlib/libc/stdio/gets.c 2023-01-20 13:01:54.000000000 -0800
+++ newlib-4.3.0.20230120-changed/newlib/libc/stdio/gets.c 2023-10-03 22:45:18.907828865 -0700
@@ -91,11 +91,11 @@
}
#ifndef _REENT_ONLY
-
+#if 0
char *
gets (char *buf)
{
return _gets_r (_REENT, buf);
}
-
+#endif
#endif
diff -aur newlib-4.3.0.20230120-orig/newlib/libc/stdio/printf.c newlib-4.3.0.20230120-changed/newlib/libc/stdio/printf.c
--- newlib-4.3.0.20230120-orig/newlib/libc/stdio/printf.c 2023-01-20 13:01:54.000000000 -0800
+++ newlib-4.3.0.20230120-changed/newlib/libc/stdio/printf.c 2023-10-03 22:45:18.907828865 -0700
@@ -44,6 +44,7 @@
#ifndef _REENT_ONLY
+#if 0
int
printf (const char *__restrict fmt, ...)
{
@@ -57,6 +58,7 @@
va_end (ap);
return ret;
}
+#endif
#ifdef _NANO_FORMATTED_IO
int
diff -aur newlib-4.3.0.20230120-orig/newlib/libc/stdio/putchar.c newlib-4.3.0.20230120-changed/newlib/libc/stdio/putchar.c
--- newlib-4.3.0.20230120-orig/newlib/libc/stdio/putchar.c 2023-01-20 13:01:54.000000000 -0800
+++ newlib-4.3.0.20230120-changed/newlib/libc/stdio/putchar.c 2023-10-03 22:45:18.907828865 -0700
@@ -75,7 +75,7 @@
}
#ifndef _REENT_ONLY
-
+#if 0
int
putchar (int c)
{
@@ -84,5 +84,5 @@
_REENT_SMALL_CHECK_INIT (reent);
return _putc_r (reent, c, _stdout_r (reent));
}
-
+#endif
#endif
diff -aur newlib-4.3.0.20230120-orig/newlib/libc/stdio/puts.c newlib-4.3.0.20230120-changed/newlib/libc/stdio/puts.c
--- newlib-4.3.0.20230120-orig/newlib/libc/stdio/puts.c 2023-01-20 13:01:54.000000000 -0800
+++ newlib-4.3.0.20230120-changed/newlib/libc/stdio/puts.c 2023-10-03 22:45:18.907828865 -0700
@@ -122,11 +122,11 @@
}
#ifndef _REENT_ONLY
-
+#if 0
int
puts (char const * s)
{
return _puts_r (_REENT, s);
}
-
+#endif
#endif
diff -aur newlib-4.3.0.20230120-orig/newlib/libc/stdlib/abs.c newlib-4.3.0.20230120-changed/newlib/libc/stdlib/abs.c
--- newlib-4.3.0.20230120-orig/newlib/libc/stdlib/abs.c 2023-01-20 13:01:54.000000000 -0800
+++ newlib-4.3.0.20230120-changed/newlib/libc/stdlib/abs.c 2023-10-03 22:45:18.907828865 -0700
@@ -30,9 +30,10 @@
*/
#include <stdlib.h>
-
+#if 0
int
abs (int i)
{
return (i < 0) ? -i : i;
}
+#endif
diff -aur newlib-4.3.0.20230120-orig/newlib/libc/stdlib/atoi.c newlib-4.3.0.20230120-changed/newlib/libc/stdlib/atoi.c
--- newlib-4.3.0.20230120-orig/newlib/libc/stdlib/atoi.c 2023-01-20 13:01:54.000000000 -0800
+++ newlib-4.3.0.20230120-changed/newlib/libc/stdlib/atoi.c 2023-10-03 22:45:18.915828904 -0700
@@ -46,11 +46,13 @@
#include <_ansi.h>
#ifndef _REENT_ONLY
+#if 0
int
atoi (const char *s)
{
return (int) strtol (s, NULL, 10);
}
+#endif
#endif /* !_REENT_ONLY */
int
diff -aur newlib-4.3.0.20230120-orig/newlib/libc/stdlib/atol.c newlib-4.3.0.20230120-changed/newlib/libc/stdlib/atol.c
--- newlib-4.3.0.20230120-orig/newlib/libc/stdlib/atol.c 2023-01-20 13:01:54.000000000 -0800
+++ newlib-4.3.0.20230120-changed/newlib/libc/stdlib/atol.c 2023-10-03 22:45:18.919828925 -0700
@@ -6,11 +6,13 @@
#include <_ansi.h>
#ifndef _REENT_ONLY
+#if 0
long
atol (const char *s)
{
return strtol (s, NULL, 10);
}
+#endif
#endif /* !_REENT_ONLY */
long
diff -aur newlib-4.3.0.20230120-orig/newlib/libc/stdlib/labs.c newlib-4.3.0.20230120-changed/newlib/libc/stdlib/labs.c
--- newlib-4.3.0.20230120-orig/newlib/libc/stdlib/labs.c 2023-01-20 13:01:54.000000000 -0800
+++ newlib-4.3.0.20230120-changed/newlib/libc/stdlib/labs.c 2023-10-03 22:45:18.919828925 -0700
@@ -31,7 +31,7 @@
*/
#include <stdlib.h>
-
+#if 0
long
labs (long x)
{
@@ -41,3 +41,4 @@
}
return x;
}
+#endif
diff -aur newlib-4.3.0.20230120-orig/newlib/libc/stdlib/rand.c newlib-4.3.0.20230120-changed/newlib/libc/stdlib/rand.c
--- newlib-4.3.0.20230120-orig/newlib/libc/stdlib/rand.c 2023-01-20 13:01:54.000000000 -0800
+++ newlib-4.3.0.20230120-changed/newlib/libc/stdlib/rand.c 2023-10-03 22:46:38.976220920 -0700
@@ -62,6 +62,7 @@
_Thread_local unsigned long long _tls_rand_next = 1;
#endif
+#if 0
void
srand (unsigned int seed)
{
@@ -84,5 +85,5 @@
_REENT_RAND_NEXT(reent) * __extension__ 6364136223846793005LL + 1;
return (int)((_REENT_RAND_NEXT(reent) >> 32) & RAND_MAX);
}
-
+#endif
#endif /* _REENT_ONLY */
diff -aur newlib-4.3.0.20230120-orig/newlib/libc/stdlib/strtol.c newlib-4.3.0.20230120-changed/newlib/libc/stdlib/strtol.c
--- newlib-4.3.0.20230120-orig/newlib/libc/stdlib/strtol.c 2023-01-20 13:01:54.000000000 -0800
+++ newlib-4.3.0.20230120-changed/newlib/libc/stdlib/strtol.c 2023-10-03 22:45:18.919828925 -0700
@@ -229,7 +229,7 @@
{
return _strtol_l (_REENT, s, ptr, base, loc);
}
-
+#if 0
long
strtol (const char *__restrict s,
char **__restrict ptr,
@@ -237,5 +237,5 @@
{
return _strtol_l (_REENT, s, ptr, base, __get_current_locale ());
}
-
+#endif
#endif
diff -aur newlib-4.3.0.20230120-orig/newlib/libc/stdlib/strtoul.c newlib-4.3.0.20230120-changed/newlib/libc/stdlib/strtoul.c
--- newlib-4.3.0.20230120-orig/newlib/libc/stdlib/strtoul.c 2023-01-20 13:01:54.000000000 -0800
+++ newlib-4.3.0.20230120-changed/newlib/libc/stdlib/strtoul.c 2023-10-03 22:45:18.919828925 -0700
@@ -203,7 +203,7 @@
{
return _strtoul_l (_REENT, s, ptr, base, loc);
}
-
+#if 0
unsigned long
strtoul (const char *__restrict s,
char **__restrict ptr,
@@ -211,5 +211,5 @@
{
return _strtoul_l (_REENT, s, ptr, base, __get_current_locale ());
}
-
+#endif
#endif
diff -aur newlib-4.3.0.20230120-orig/newlib/libc/string/index.c newlib-4.3.0.20230120-changed/newlib/libc/string/index.c
--- newlib-4.3.0.20230120-orig/newlib/libc/string/index.c 2023-01-20 13:01:54.000000000 -0800
+++ newlib-4.3.0.20230120-changed/newlib/libc/string/index.c 2023-10-03 22:45:18.923828944 -0700
@@ -29,10 +29,11 @@
#include <string.h>
#include <strings.h>
-
+#if 0
char *
index (const char *s,
int c)
{
return strchr (s, c);
}
+#endif
diff -aur newlib-4.3.0.20230120-orig/newlib/libc/string/rindex.c newlib-4.3.0.20230120-changed/newlib/libc/string/rindex.c
--- newlib-4.3.0.20230120-orig/newlib/libc/string/rindex.c 2023-01-20 13:01:54.000000000 -0800
+++ newlib-4.3.0.20230120-changed/newlib/libc/string/rindex.c 2023-10-03 22:45:18.935829003 -0700
@@ -29,10 +29,11 @@
#include <string.h>
#include <strings.h>
-
+#if 0
char *
rindex (const char *s,
int c)
{
return strrchr (s, c);
}
+#endif
diff -aur newlib-4.3.0.20230120-orig/newlib/libc/string/strcat.c newlib-4.3.0.20230120-changed/newlib/libc/string/strcat.c
--- newlib-4.3.0.20230120-orig/newlib/libc/string/strcat.c 2023-01-20 13:01:54.000000000 -0800
+++ newlib-4.3.0.20230120-changed/newlib/libc/string/strcat.c 2023-10-03 22:45:18.935829003 -0700
@@ -52,7 +52,7 @@
/*SUPPRESS 560*/
/*SUPPRESS 530*/
-
+#if 0
char *
strcat (char *__restrict s1,
const char *__restrict s2)
@@ -95,3 +95,4 @@
return s;
#endif /* not PREFER_SIZE_OVER_SPEED */
}
+#endif
diff -aur newlib-4.3.0.20230120-orig/newlib/libc/string/strchr.c newlib-4.3.0.20230120-changed/newlib/libc/string/strchr.c
--- newlib-4.3.0.20230120-orig/newlib/libc/string/strchr.c 2023-01-20 13:01:54.000000000 -0800
+++ newlib-4.3.0.20230120-changed/newlib/libc/string/strchr.c 2023-10-03 22:45:18.935829003 -0700
@@ -50,7 +50,7 @@
/* DETECTCHAR returns nonzero if (long)X contains the byte used
to fill (long)MASK. */
#define DETECTCHAR(X,MASK) (DETECTNULL(X ^ MASK))
-
+#if 0
char *
strchr (const char *s1,
int i)
@@ -114,3 +114,4 @@
return (char *)s;
return NULL;
}
+#endif
diff -aur newlib-4.3.0.20230120-orig/newlib/libc/string/strcmp.c newlib-4.3.0.20230120-changed/newlib/libc/string/strcmp.c
--- newlib-4.3.0.20230120-orig/newlib/libc/string/strcmp.c 2023-01-20 13:01:54.000000000 -0800
+++ newlib-4.3.0.20230120-changed/newlib/libc/string/strcmp.c 2023-10-03 22:45:18.935829003 -0700
@@ -50,7 +50,7 @@
#ifndef DETECTNULL
#error long int is not a 32bit or 64bit byte
#endif
-
+#if 0
int
strcmp (const char *s1,
const char *s2)
@@ -97,3 +97,4 @@
return (*(unsigned char *) s1) - (*(unsigned char *) s2);
#endif /* not PREFER_SIZE_OVER_SPEED */
}
+#endif
diff -aur newlib-4.3.0.20230120-orig/newlib/libc/string/strcpy.c newlib-4.3.0.20230120-changed/newlib/libc/string/strcpy.c
--- newlib-4.3.0.20230120-orig/newlib/libc/string/strcpy.c 2023-01-20 13:01:54.000000000 -0800
+++ newlib-4.3.0.20230120-changed/newlib/libc/string/strcpy.c 2023-10-03 22:45:18.935829003 -0700
@@ -50,7 +50,7 @@
#ifndef DETECTNULL
#error long int is not a 32bit or 64bit byte
#endif
-
+#if 0
char*
strcpy (char *dst0,
const char *src0)
@@ -90,3 +90,4 @@
return dst0;
#endif /* not PREFER_SIZE_OVER_SPEED */
}
+#endif
diff -aur newlib-4.3.0.20230120-orig/newlib/libc/string/strcspn.c newlib-4.3.0.20230120-changed/newlib/libc/string/strcspn.c
--- newlib-4.3.0.20230120-orig/newlib/libc/string/strcspn.c 2023-01-20 13:01:54.000000000 -0800
+++ newlib-4.3.0.20230120-changed/newlib/libc/string/strcspn.c 2023-10-03 22:45:18.935829003 -0700
@@ -24,7 +24,7 @@
*/
#include <string.h>
-
+#if 0
size_t
strcspn (const char *s1,
const char *s2)
@@ -46,3 +46,4 @@
return s1 - s;
}
+#endif
diff -aur newlib-4.3.0.20230120-orig/newlib/libc/string/strlen.c newlib-4.3.0.20230120-changed/newlib/libc/string/strlen.c
--- newlib-4.3.0.20230120-orig/newlib/libc/string/strlen.c 2023-01-20 13:01:54.000000000 -0800
+++ newlib-4.3.0.20230120-changed/newlib/libc/string/strlen.c 2023-10-03 22:45:18.935829003 -0700
@@ -47,7 +47,7 @@
#ifndef DETECTNULL
#error long int is not a 32bit or 64bit byte
#endif
-
+#if 0
size_t
strlen (const char *str)
{
@@ -80,3 +80,4 @@
str++;
return str - start;
}
+#endif
diff -aur newlib-4.3.0.20230120-orig/newlib/libc/string/strncat.c newlib-4.3.0.20230120-changed/newlib/libc/string/strncat.c
--- newlib-4.3.0.20230120-orig/newlib/libc/string/strncat.c 2023-01-20 13:01:54.000000000 -0800
+++ newlib-4.3.0.20230120-changed/newlib/libc/string/strncat.c 2023-10-03 22:45:18.935829003 -0700
@@ -56,7 +56,7 @@
#ifndef DETECTNULL
#error long int is not a 32bit or 64bit byte
#endif
-
+#if 0
char *
strncat (char *__restrict s1,
const char *__restrict s2,
@@ -105,3 +105,4 @@
return s;
#endif /* not PREFER_SIZE_OVER_SPEED */
}
+#endif
diff -aur newlib-4.3.0.20230120-orig/newlib/libc/string/strncmp.c newlib-4.3.0.20230120-changed/newlib/libc/string/strncmp.c
--- newlib-4.3.0.20230120-orig/newlib/libc/string/strncmp.c 2023-01-20 13:01:54.000000000 -0800
+++ newlib-4.3.0.20230120-changed/newlib/libc/string/strncmp.c 2023-10-03 22:45:18.939829024 -0700
@@ -50,7 +50,7 @@
#ifndef DETECTNULL
#error long int is not a 32bit or 64bit byte
#endif
-
+#if 0
int
strncmp (const char *s1,
const char *s2,
@@ -112,3 +112,4 @@
return (*(unsigned char *) s1) - (*(unsigned char *) s2);
#endif /* not PREFER_SIZE_OVER_SPEED */
}
+#endif
diff -aur newlib-4.3.0.20230120-orig/newlib/libc/string/strncpy.c newlib-4.3.0.20230120-changed/newlib/libc/string/strncpy.c
--- newlib-4.3.0.20230120-orig/newlib/libc/string/strncpy.c 2023-01-20 13:01:54.000000000 -0800
+++ newlib-4.3.0.20230120-changed/newlib/libc/string/strncpy.c 2023-10-03 22:45:18.939829024 -0700
@@ -57,7 +57,7 @@
#endif
#define TOO_SMALL(LEN) ((LEN) < sizeof (long))
-
+#if 0
char *
strncpy (char *__restrict dst0,
const char *__restrict src0,
@@ -116,3 +116,4 @@
return dst0;
#endif /* not PREFER_SIZE_OVER_SPEED */
}
+#endif
diff -aur newlib-4.3.0.20230120-orig/newlib/libc/string/strrchr.c newlib-4.3.0.20230120-changed/newlib/libc/string/strrchr.c
--- newlib-4.3.0.20230120-orig/newlib/libc/string/strrchr.c 2023-01-20 13:01:54.000000000 -0800
+++ newlib-4.3.0.20230120-changed/newlib/libc/string/strrchr.c 2023-10-03 22:45:18.939829024 -0700
@@ -28,7 +28,7 @@
*/
#include <string.h>
-
+#if 0
char *
strrchr (const char *s,
int i)
@@ -51,3 +51,4 @@
return (char *) last;
}
+#endif
diff -aur newlib-4.3.0.20230120-orig/newlib/libc/string/strspn.c newlib-4.3.0.20230120-changed/newlib/libc/string/strspn.c
--- newlib-4.3.0.20230120-orig/newlib/libc/string/strspn.c 2023-01-20 13:01:54.000000000 -0800
+++ newlib-4.3.0.20230120-changed/newlib/libc/string/strspn.c 2023-10-03 22:45:18.939829024 -0700
@@ -28,7 +28,7 @@
*/
#include <string.h>
-
+#if 0
size_t
strspn (const char *s1,
const char *s2)
@@ -50,3 +50,4 @@
return s1 - s;
}
+#endif
diff -aur newlib-4.3.0.20230120-orig/newlib/libc/string/strtok.c newlib-4.3.0.20230120-changed/newlib/libc/string/strtok.c
--- newlib-4.3.0.20230120-orig/newlib/libc/string/strtok.c 2023-01-20 13:01:54.000000000 -0800
+++ newlib-4.3.0.20230120-changed/newlib/libc/string/strtok.c 2023-10-03 22:45:18.939829024 -0700
@@ -82,6 +82,7 @@
extern char *__strtok_r (char *, const char *, char **, int);
+#if 0
char *
strtok (register char *__restrict s,
register const char *__restrict delim)
@@ -92,3 +93,4 @@
return __strtok_r (s, delim, &(_REENT_STRTOK_LAST(reent)), 1);
}
#endif
+#endif