[76f2a2e] | 1 | diff -Naur newlib-1.18.0.orig/newlib/ChangeLog.rtems newlib-1.18.0-rtems4.11-20100423/newlib/ChangeLog.rtems |
---|
| 2 | --- newlib-1.18.0.orig/newlib/ChangeLog.rtems 1970-01-01 01:00:00.000000000 +0100 |
---|
| 3 | +++ newlib-1.18.0-rtems4.11-20100423/newlib/ChangeLog.rtems 2010-04-23 15:04:30.000000000 +0200 |
---|
| 4 | @@ -0,0 +1,202 @@ |
---|
| 5 | +2010-04-23 Ralf Corsépius <ralf.corsepius@rtems.org> |
---|
| 6 | + |
---|
| 7 | + * libc/sys/rtems/machine/_types.h: Add _mode_t. |
---|
| 8 | + * libc/include/sys/types.h: Derive mode_t from _mode_t. |
---|
| 9 | + |
---|
| 10 | +2010-04-02 Ralf Corsépius <ralf.corsepius@rtems.org> |
---|
| 11 | + |
---|
| 12 | + * libc/include/sched.h, libc/include/sys/sched.h: |
---|
| 13 | + Adopt newlib-cvs's versions. |
---|
| 14 | + |
---|
| 15 | +2010-03-25 Ralf Corsépius <ralf.corsepius@rtems.org> |
---|
| 16 | + |
---|
| 17 | + * libc/include/strings.h: New (split-out from string.h). |
---|
| 18 | + * libc/include/string.h: Remove bcmp, bcopy, bzero, ffs, index, rindex, |
---|
| 19 | + strcasecmp, strncasecmp (Moved to strings.h). |
---|
| 20 | + Remove strcmpi, stricmp, strncmpi, strnicmp. |
---|
| 21 | + * libc/misc/ffs.c: Use <strings.h> instead of <string.h>. |
---|
| 22 | + * libc/string/bcmp.c: Use <strings.h> instead of <string.h>. |
---|
| 23 | + * libc/string/bzero.c: Use <strings.h> instead of <string.h>. |
---|
| 24 | + * libc/string/rindex.c: Use <strings.h> instead of <string.h>. |
---|
| 25 | + * libc/string/strcasecmp.c: Use <strings.h> instead of <string.h>. |
---|
| 26 | + * libc/string/strcasecmp.c: Use <strings.h> instead of <string.h>. |
---|
| 27 | + |
---|
| 28 | +2010-03-23 Ralf Corsépius <ralf.corsepius@rtems.org> |
---|
| 29 | + |
---|
| 30 | + * libc/sys/rtems/machine/_types.h: Add i386 to 64bit off_t targets. |
---|
| 31 | + |
---|
| 32 | +2010-03-10 Ralf Corsépius <ralf.corsepius@rtems.org> |
---|
| 33 | + |
---|
| 34 | + * libc/posix/telldir.c: Adopt newlib-cvs's telldir.c |
---|
| 35 | + |
---|
| 36 | +2010-02-10 Ralf Corsépius <ralf.corsepius@rtems.org> |
---|
| 37 | + |
---|
| 38 | + * libc/sys/rtems/machine/_types.h: Use __int64_t for _off_t, fpos_t for |
---|
| 39 | + selected targets. |
---|
| 40 | + |
---|
| 41 | +2010-02-05 Ralf Corsépius <ralf.corsepius@rtems.org> |
---|
| 42 | + |
---|
| 43 | + * libc/posix/telldir.c: Remove bogus nested prototype of lseek(). |
---|
| 44 | + |
---|
| 45 | +2010-01-11 Sebastian Huber <sebastian.huber@embedded-brains.de> |
---|
| 46 | + |
---|
| 47 | + * libc/posix/telldir.c (_cleanupdir): Fixed usage of freed memory. |
---|
| 48 | + |
---|
| 49 | +2009-12-18 Ralf Corsépius <ralf.corsepius@rtems.org> |
---|
| 50 | + |
---|
| 51 | + * libc/search/db_local.h: |
---|
| 52 | + Use __uint32_t instead of u_int (prototype mismatches). |
---|
| 53 | + * libc/search/extern.h (__buf_init): |
---|
| 54 | + Use __uint32_t instead of int (16 bit target portability). |
---|
| 55 | + * libc/search/hash_buf.c: Use ptrdiff_t instead of __uint32_t, |
---|
| 56 | + use __uint32_t instead of int (16 bit target portability). |
---|
| 57 | + * libc/search/hash.h: Use __uint32_it instead of int |
---|
| 58 | + (16 bit target portability). |
---|
| 59 | + * libm/common/modfl.c: Add cast to (double*) to avoid GCC warning. |
---|
| 60 | + * libm/common/sf_llrint.c, libm/common/sf_round.c: Add explicit |
---|
| 61 | + casts to __uint32_t to avoid overflows on implicit casts. |
---|
| 62 | + |
---|
| 63 | +2009-12-18 Ralf Corsépius <ralf.corsepius@rtems.org> |
---|
| 64 | + |
---|
| 65 | + Merger with newlib-1.18.0. |
---|
| 66 | + |
---|
| 67 | +2009-10-29 Ralf Corsépius <ralf.corsepius@rtems.org> |
---|
| 68 | + |
---|
| 69 | + * libc/sys/rtems/machine/_types.h: Rework. |
---|
| 70 | + * libc/sys/rtems/machine/stdint.h: Remove. |
---|
| 71 | + * libc/include/inttypes.h: |
---|
| 72 | + Rework logic to determine PRI*PTR. |
---|
| 73 | + Prefer long64 over longlong64. |
---|
| 74 | + * libc/include/machine/_default_types.h: |
---|
| 75 | + Sync logic for __int32 with stdint.h (Prefer long over int). |
---|
| 76 | + * libc/include/stdint.h: |
---|
| 77 | + Remove __SPU__ hack. |
---|
| 78 | + Prefer int for int16_t (sync with _default_types.h). |
---|
| 79 | + Rework intptr_t determination. |
---|
| 80 | + |
---|
| 81 | +2009-10-28 Ralf Corsépius <ralf.corsepius@rtems.org> |
---|
| 82 | + |
---|
| 83 | + * libc/sys/rtems/machine/_types.h: New. |
---|
| 84 | + Add custom time for _ssize_t. |
---|
| 85 | + * libc/stdlib/assert.c: Sync with newlib-CVS. |
---|
| 86 | + * configure.host: Add -DHAVE_ASSERT_FUNC to newlib_cflags. |
---|
| 87 | + |
---|
| 88 | +2009-10-27 Ralf Corsépius <ralf.corsepius@rtems.org> |
---|
| 89 | + |
---|
| 90 | + * libc/include/sys/pthread.h: |
---|
| 91 | + Add pthread_atfork (Mandated by IEEE Std 1003.1-2008). |
---|
| 92 | + Add pthread_rwlock_unlock (Formerly missing) |
---|
| 93 | + |
---|
| 94 | +2009-10-26 Ralf Corsépius <ralf.corsepius@rtems.org> |
---|
| 95 | + |
---|
| 96 | + * libc/include/sys/signal.h: Sync with newlib-CVS. |
---|
| 97 | + |
---|
| 98 | +2009-10-09 Ralf Corsépius <ralf.corsepius@rtems.org> |
---|
| 99 | + |
---|
| 100 | + * libc/include/sys/signal.h: Use pid_t as 1st arg to kill() |
---|
| 101 | + (mandated by POSIX). |
---|
| 102 | + |
---|
| 103 | +2009-09-22 Ralf Corsépius <ralf.corsepius@rtems.org> |
---|
| 104 | + |
---|
| 105 | + * libc/sys/rtems/sys/queue.h: Update copyright (from FreeBSD). |
---|
| 106 | + Remove CIRCLEQ_*. |
---|
| 107 | + * libc/search/hcreate.c: Don't include sys/queue.h. |
---|
| 108 | + |
---|
| 109 | +2009-09-18 Christopher Faylor <me+cygwin@cgf.cx> |
---|
| 110 | + |
---|
| 111 | + * libc/include/sys/unistd.h: Declare getpagesize as returning |
---|
| 112 | + POSIX-mandated int. |
---|
| 113 | + |
---|
| 114 | +2009-09-16 Ralf Corsépius <ralf.corsepius@rtems.org> |
---|
| 115 | + |
---|
| 116 | + * libc/sys/rtems/crt0.c: Use while(1) in _exit stub to silence GCC "noreturn" |
---|
| 117 | + warning. |
---|
| 118 | + |
---|
| 119 | +2009-09-15 Ralf Corsépius <ralf.corsepius@rtems.org> |
---|
| 120 | + |
---|
| 121 | + * libc/include/stdlib.h: Add posix_memalign. |
---|
| 122 | + |
---|
| 123 | +2009-09-11 Ralf Corsépius <ralf.corsepius@rtems.org> |
---|
| 124 | + |
---|
| 125 | + * configure.host (m32c): Remove -D_ABORT_PROVIDED. |
---|
| 126 | + |
---|
| 127 | +2009-09-10 Ralf Corsépius <ralf.corsepius@rtems.org> |
---|
| 128 | + |
---|
| 129 | + * configure.host: Add -D_NO_POPEN. |
---|
| 130 | + * libc/sys/rtems/crt0.c: Don't provide waitpid unless used. |
---|
| 131 | + |
---|
| 132 | +2009-09-09 Ralf Corsépius <ralf.corsepius@rtems.org> |
---|
| 133 | + |
---|
| 134 | + * configure.host: Add -D_NO_WORDEXP. |
---|
| 135 | + |
---|
| 136 | +2009-09-06 Ralf Corsépius <ralf.corsepius@rtems.org> |
---|
| 137 | + |
---|
| 138 | + * libc/sys/rtems/crt0.c: Add issetugid. |
---|
| 139 | + |
---|
| 140 | +2009-09-02 Ralf Corsépius <ralf.corsepius@rtems.org> |
---|
| 141 | + |
---|
| 142 | + * libc/sys/rtems/crt0.c: Rework. Introduce macro RTEMS_STUB. |
---|
| 143 | + |
---|
| 144 | +2009-07-27 Ralf Corsépius <ralf.corsepius@rtems.org> |
---|
| 145 | + |
---|
| 146 | + * libc/sys/rtems/crt0.c: Add _isatty_r. |
---|
| 147 | + |
---|
| 148 | +2009-07-06 Joel Sherrill <joel.sherrill@oarcorp.com> |
---|
| 149 | + |
---|
| 150 | + * libc/include/sys/features.h: Define _UNIX98_THREAD_MUTEX_ATTRIBUTES. |
---|
| 151 | + |
---|
| 152 | +2009-05-05 Ralf Corsépius <ralf.corsepius@rtems.org> |
---|
| 153 | + |
---|
| 154 | + * configure.host: Remove -DMISSING_SYSCALL_NAMES. |
---|
| 155 | + |
---|
| 156 | +2009-03-11 Ralf Corsépius <ralf.corsepius@rtems.org> |
---|
| 157 | + |
---|
| 158 | + * libc/stdlib/assert.c: Don't build __assert_func. |
---|
| 159 | + * libc/sys/rtems/crt0.c: Add __assert_func. |
---|
| 160 | + |
---|
| 161 | +2009-03-09 Ralf Corsépius <ralf.corsepius@rtems.org> |
---|
| 162 | + |
---|
| 163 | + * libc/machine/powerpc/times.c: Remove. |
---|
| 164 | + * libc/machine/powerpc/Makefile.am: Remove times.c. |
---|
| 165 | + * libc/machine/powerpc/Makefile.in: Regenerate. |
---|
| 166 | + |
---|
| 167 | +2009-02-24 Ralf Corsépius <ralf.corsepius@rtems.org> |
---|
| 168 | + |
---|
| 169 | + * libc/unix/ttyname.c: Sync with newlib-cvs. |
---|
| 170 | + * configure.host: Add -DHAVE_BLKSIZE to newlib_cflags. |
---|
| 171 | + |
---|
| 172 | +2009-02-22 Ralf Corsépius <ralf.corsepius@rtems.org> |
---|
| 173 | + |
---|
| 174 | + * libc/sys/rtems/machine/stdint.h: Add __lm32__. |
---|
| 175 | + * libc/machine/lm32/configure.in: Set AC_CONFIG_SRC to setjmp.S. |
---|
| 176 | + * libc/machine/lm32/configure: Regenerate. |
---|
| 177 | + |
---|
| 178 | +2009-02-20 Ralf Corsépius <ralf.corsepius@rtems.org> |
---|
| 179 | + |
---|
| 180 | + * libc/unix/Makefile.in: Regenerate. |
---|
| 181 | + |
---|
| 182 | +2009-02-20 Craig Howland <howland@LGSInnovations.com> on behalf of |
---|
| 183 | + Sebastian Huber <sebastian.huber@embedded-brains.de> |
---|
| 184 | + |
---|
| 185 | + * libc/unix/ttyname.c: Remove ttyname_r() (to a new file to avoid |
---|
| 186 | + coupling ttyname_r() and ttyname() due to the latter's large buffer). |
---|
| 187 | + * libc/unix/ttyname_r.c: New file to hold ttyname_r(), previously in |
---|
| 188 | + ttyname.c. |
---|
| 189 | + * libc/unix/ttyname.h: New file (common size definition for the 2 |
---|
| 190 | + ttyname*c files that are now split). |
---|
| 191 | + * libc/unix/Makefile.am (ELIX_2_SOURCES): Add ttyname_r.c. |
---|
| 192 | + |
---|
| 193 | +2009-02-16 Ralf Corsépius <ralf.corsepius@rtems.org> |
---|
| 194 | + |
---|
| 195 | + * libc/sys/rtems/sys/param.h: |
---|
| 196 | + Update copyright notice from FreeBSD. |
---|
| 197 | + Remove HZ. |
---|
| 198 | + Add #include <sys/priority.h> |
---|
| 199 | + Remove priority handling (moved to sys/priority.h). |
---|
| 200 | + Remove CLBYTES (Unused, abandoned in BSD). |
---|
| 201 | + |
---|
| 202 | +2009-02-06 Ralf Corsépius <ralf.corsepius@rtems.org> |
---|
| 203 | + |
---|
| 204 | + * libc/include/sched.h: |
---|
| 205 | + Remove (collides with RTEMS's schedul.h). |
---|
| 206 | + |
---|
| 207 | diff -Naur newlib-1.18.0.orig/newlib/libc/include/inttypes.h newlib-1.18.0-rtems4.11-20100423/newlib/libc/include/inttypes.h |
---|
| 208 | --- newlib-1.18.0.orig/newlib/libc/include/inttypes.h 2009-01-19 23:02:06.000000000 +0100 |
---|
| 209 | +++ newlib-1.18.0-rtems4.11-20100423/newlib/libc/include/inttypes.h 2010-04-15 17:32:04.000000000 +0200 |
---|
| 210 | @@ -242,6 +242,20 @@ |
---|
| 211 | #define SCNxMAX __SCNMAX(x) |
---|
| 212 | |
---|
| 213 | /* ptr types */ |
---|
| 214 | +#if INTPTR_MAX == INT64_MAX |
---|
| 215 | +#define __PRIPTR(x) __PRI64(x) |
---|
| 216 | +#define __SCNPTR(x) __SCN64(x) |
---|
| 217 | +#elif INTPTR_MAX == INT32_MAX |
---|
| 218 | +#define __PRIPTR(x) __PRI32(x) |
---|
| 219 | +#define __SCNPTR(x) __SCN32(x) |
---|
| 220 | +#elif INTPTR_MAX == INT16_MAX |
---|
| 221 | +#define __PRIPTR(x) __PRI16(x) |
---|
| 222 | +#define __SCNPTR(x) __SCN16(x) |
---|
| 223 | +#else |
---|
| 224 | +#error cannot determine PRI*PTR |
---|
| 225 | +#endif |
---|
| 226 | + |
---|
| 227 | +#if 0 |
---|
| 228 | #if __have_long64 |
---|
| 229 | #define __PRIPTR(x) __STRINGIFY(l##x) |
---|
| 230 | #define __SCNPTR(x) __STRINGIFY(l##x) |
---|
| 231 | @@ -252,6 +266,7 @@ |
---|
| 232 | #define __PRIPTR(x) __STRINGIFY(x) |
---|
| 233 | #define __SCNPTR(x) __STRINGIFY(x) |
---|
| 234 | #endif |
---|
| 235 | +#endif |
---|
| 236 | |
---|
| 237 | #define PRIdPTR __PRIPTR(d) |
---|
| 238 | #define PRIiPTR __PRIPTR(i) |
---|
| 239 | diff -Naur newlib-1.18.0.orig/newlib/libc/include/machine/_default_types.h newlib-1.18.0-rtems4.11-20100423/newlib/libc/include/machine/_default_types.h |
---|
| 240 | --- newlib-1.18.0.orig/newlib/libc/include/machine/_default_types.h 2008-06-12 00:14:54.000000000 +0200 |
---|
| 241 | +++ newlib-1.18.0-rtems4.11-20100423/newlib/libc/include/machine/_default_types.h 2010-04-15 17:32:04.000000000 +0200 |
---|
| 242 | @@ -54,14 +54,14 @@ |
---|
| 243 | #endif |
---|
| 244 | #endif |
---|
| 245 | |
---|
| 246 | -#if __EXP(INT_MAX) == 0x7fffffffL |
---|
| 247 | -typedef signed int __int32_t; |
---|
| 248 | -typedef unsigned int __uint32_t; |
---|
| 249 | -#define ___int32_t_defined 1 |
---|
| 250 | -#elif __EXP(LONG_MAX) == 0x7fffffffL |
---|
| 251 | +#if __EXP(LONG_MAX) == 0x7fffffffL |
---|
| 252 | typedef signed long __int32_t; |
---|
| 253 | typedef unsigned long __uint32_t; |
---|
| 254 | #define ___int32_t_defined 1 |
---|
| 255 | +#elif __EXP(INT_MAX) == 0x7fffffffL |
---|
| 256 | +typedef signed int __int32_t; |
---|
| 257 | +typedef unsigned int __uint32_t; |
---|
| 258 | +#define ___int32_t_defined 1 |
---|
| 259 | #elif __EXP(SHRT_MAX) == 0x7fffffffL |
---|
| 260 | typedef signed short __int32_t; |
---|
| 261 | typedef unsigned short __uint32_t; |
---|
| 262 | diff -Naur newlib-1.18.0.orig/newlib/libc/include/sched.h newlib-1.18.0-rtems4.11-20100423/newlib/libc/include/sched.h |
---|
| 263 | --- newlib-1.18.0.orig/newlib/libc/include/sched.h 2007-09-21 23:02:15.000000000 +0200 |
---|
| 264 | +++ newlib-1.18.0-rtems4.11-20100423/newlib/libc/include/sched.h 2010-04-15 17:32:04.000000000 +0200 |
---|
| 265 | @@ -1,11 +1,94 @@ |
---|
| 266 | +/* |
---|
| 267 | + * Written by Joel Sherrill <joel@OARcorp.com>. |
---|
| 268 | + * |
---|
| 269 | + * COPYRIGHT (c) 1989-2010. |
---|
| 270 | + * On-Line Applications Research Corporation (OAR). |
---|
| 271 | + * |
---|
| 272 | + * Permission to use, copy, modify, and distribute this software for any |
---|
| 273 | + * purpose without fee is hereby granted, provided that this entire notice |
---|
| 274 | + * is included in all copies of any software which is or includes a copy |
---|
| 275 | + * or modification of this software. |
---|
| 276 | + * |
---|
| 277 | + * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED |
---|
| 278 | + * WARRANTY. IN PARTICULAR, THE AUTHOR MAKES NO REPRESENTATION |
---|
| 279 | + * OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY OF THIS |
---|
| 280 | + * SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE. |
---|
| 281 | + * |
---|
| 282 | + * $Id$ |
---|
| 283 | + */ |
---|
| 284 | + |
---|
| 285 | #ifndef _SCHED_H_ |
---|
| 286 | #define _SCHED_H_ |
---|
| 287 | |
---|
| 288 | +#include <sys/types.h> |
---|
| 289 | +#include <sys/sched.h> |
---|
| 290 | + |
---|
| 291 | #ifdef __cplusplus |
---|
| 292 | extern "C" { |
---|
| 293 | #endif |
---|
| 294 | |
---|
| 295 | -#include <sys/sched.h> |
---|
| 296 | +#if defined(_POSIX_PRIORITY_SCHEDULING) |
---|
| 297 | +/* |
---|
| 298 | + * XBD 13 - Set Scheduling Parameters, P1003.1b-2008, p. 1803 |
---|
| 299 | + */ |
---|
| 300 | +int sched_setparam( |
---|
| 301 | + pid_t __pid, |
---|
| 302 | + const struct sched_param *__param |
---|
| 303 | +); |
---|
| 304 | + |
---|
| 305 | +/* |
---|
| 306 | + * XBD 13 - Set Scheduling Parameters, P1003.1b-2008, p. 1800 |
---|
| 307 | + */ |
---|
| 308 | +int sched_getparam( |
---|
| 309 | + pid_t __pid, |
---|
| 310 | + struct sched_param *__param |
---|
| 311 | +); |
---|
| 312 | + |
---|
| 313 | +/* |
---|
| 314 | + * XBD 13 - Set Scheduling Policy and Scheduling Parameters, |
---|
| 315 | + * P1003.1b-2008, p. 1805 |
---|
| 316 | + */ |
---|
| 317 | +int sched_setscheduler( |
---|
| 318 | + pid_t __pid, |
---|
| 319 | + int __policy, |
---|
| 320 | + const struct sched_param *__param |
---|
| 321 | +); |
---|
| 322 | + |
---|
| 323 | +/* |
---|
| 324 | + * XBD 13 - Get Scheduling Policy, P1003.1b-2008, p. 1801 |
---|
| 325 | + */ |
---|
| 326 | +int sched_getscheduler( |
---|
| 327 | + pid_t __pid |
---|
| 328 | +); |
---|
| 329 | + |
---|
| 330 | +/* |
---|
| 331 | + * XBD 13 - Get Scheduling Parameter Limits, P1003.1b-2008, p. 1799 |
---|
| 332 | + */ |
---|
| 333 | +int sched_get_priority_max( |
---|
| 334 | + int __policy |
---|
| 335 | +); |
---|
| 336 | + |
---|
| 337 | +int sched_get_priority_min( |
---|
| 338 | + int __policy |
---|
| 339 | +); |
---|
| 340 | + |
---|
| 341 | +/* |
---|
| 342 | + * XBD 13 - Get Scheduling Parameter Limits, P1003.1b-2008, p. 1802 |
---|
| 343 | + */ |
---|
| 344 | +int sched_rr_get_interval( |
---|
| 345 | + pid_t __pid, |
---|
| 346 | + struct timespec *__interval |
---|
| 347 | +); |
---|
| 348 | +#endif /* _POSIX_PRIORITY_SCHEDULING */ |
---|
| 349 | + |
---|
| 350 | +#if defined(_POSIX_THREADS) || defined(_POSIX_PRIORITY_SCHEDULING) |
---|
| 351 | + |
---|
| 352 | +/* |
---|
| 353 | + * XBD 13 - Yield Processor, P1003.1b-2008, p. 1807 |
---|
| 354 | + */ |
---|
| 355 | +int sched_yield( void ); |
---|
| 356 | + |
---|
| 357 | +#endif /* _POSIX_THREADS or _POSIX_PRIORITY_SCHEDULING */ |
---|
| 358 | |
---|
| 359 | #ifdef __cplusplus |
---|
| 360 | } |
---|
| 361 | diff -Naur newlib-1.18.0.orig/newlib/libc/include/stdint.h newlib-1.18.0-rtems4.11-20100423/newlib/libc/include/stdint.h |
---|
| 362 | --- newlib-1.18.0.orig/newlib/libc/include/stdint.h 2009-04-24 23:55:07.000000000 +0200 |
---|
| 363 | +++ newlib-1.18.0-rtems4.11-20100423/newlib/libc/include/stdint.h 2010-04-15 17:32:04.000000000 +0200 |
---|
| 364 | @@ -33,7 +33,7 @@ |
---|
| 365 | /* Check if "long" is 64bit or 32bit wide */ |
---|
| 366 | #if __STDINT_EXP(LONG_MAX) > 0x7fffffff |
---|
| 367 | #define __have_long64 1 |
---|
| 368 | -#elif __STDINT_EXP(LONG_MAX) == 0x7fffffff && !defined(__SPU__) |
---|
| 369 | +#elif __STDINT_EXP(LONG_MAX) == 0x7fffffff |
---|
| 370 | #define __have_long32 1 |
---|
| 371 | #endif |
---|
| 372 | |
---|
| 373 | @@ -49,14 +49,14 @@ |
---|
| 374 | #define __int_least8_t_defined 1 |
---|
| 375 | #endif |
---|
| 376 | |
---|
| 377 | -#if __STDINT_EXP(SHRT_MAX) == 0x7fff |
---|
| 378 | -typedef signed short int16_t; |
---|
| 379 | -typedef unsigned short uint16_t; |
---|
| 380 | -#define __int16_t_defined 1 |
---|
| 381 | -#elif __STDINT_EXP(INT_MAX) == 0x7fff |
---|
| 382 | +#if __STDINT_EXP(INT_MAX) == 0x7fff |
---|
| 383 | typedef signed int int16_t; |
---|
| 384 | typedef unsigned int uint16_t; |
---|
| 385 | #define __int16_t_defined 1 |
---|
| 386 | +#elif __STDINT_EXP(SHRT_MAX) == 0x7fff |
---|
| 387 | +typedef signed short int16_t; |
---|
| 388 | +typedef unsigned short uint16_t; |
---|
| 389 | +#define __int16_t_defined 1 |
---|
| 390 | #elif __STDINT_EXP(SCHAR_MAX) == 0x7fff |
---|
| 391 | typedef signed char int16_t; |
---|
| 392 | typedef unsigned char uint16_t; |
---|
| 393 | @@ -239,6 +239,29 @@ |
---|
| 394 | * GCC doesn't provide an appropriate macro for [u]intptr_t |
---|
| 395 | * For now, use __PTRDIFF_TYPE__ |
---|
| 396 | */ |
---|
| 397 | +#if defined(__SIZEOF_POINTER__) |
---|
| 398 | +#if __SIZEOF_POINTER__ == 8 |
---|
| 399 | + typedef int64_t intptr_t; |
---|
| 400 | + typedef uint64_t uintptr_t; |
---|
| 401 | +#define INTPTR_MAX INT64_MAX |
---|
| 402 | +#define INTPTR_MIN INT64_MIN |
---|
| 403 | +#define UINTPTR_MAX UINT64_MAX |
---|
| 404 | +#elif __SIZEOF_POINTER__ == 4 |
---|
| 405 | + typedef int32_t intptr_t; |
---|
| 406 | + typedef uint32_t uintptr_t; |
---|
| 407 | +#define INTPTR_MAX INT32_MAX |
---|
| 408 | +#define INTPTR_MIN INT32_MIN |
---|
| 409 | +#define UINTPTR_MAX UINT32_MAX |
---|
| 410 | +#elif __SIZEOF_POINTER__ == 2 |
---|
| 411 | + typedef int16_t intptr_t; |
---|
| 412 | + typedef uint16_t uintptr_t; |
---|
| 413 | +#define INTPTR_MAX INT16_MAX |
---|
| 414 | +#define INTPTR_MIN INT16_MIN |
---|
| 415 | +#define UINTPTR_MAX UINT16_MAX |
---|
| 416 | +#else |
---|
| 417 | +#error cannot determine intptr_t |
---|
| 418 | +#endif |
---|
| 419 | +#else |
---|
| 420 | #if defined(__PTRDIFF_TYPE__) |
---|
| 421 | typedef signed __PTRDIFF_TYPE__ intptr_t; |
---|
| 422 | typedef unsigned __PTRDIFF_TYPE__ uintptr_t; |
---|
| 423 | @@ -260,6 +283,7 @@ |
---|
| 424 | #define INTPTR_MIN (-__STDINT_EXP(LONG_MAX) - 1) |
---|
| 425 | #define UINTPTR_MAX (__STDINT_EXP(LONG_MAX) * 2UL + 1) |
---|
| 426 | #endif |
---|
| 427 | +#endif |
---|
| 428 | |
---|
| 429 | /* Limits of Specified-Width Integer Types */ |
---|
| 430 | |
---|
| 431 | diff -Naur newlib-1.18.0.orig/newlib/libc/include/string.h newlib-1.18.0-rtems4.11-20100423/newlib/libc/include/string.h |
---|
| 432 | --- newlib-1.18.0.orig/newlib/libc/include/string.h 2008-06-18 17:27:27.000000000 +0200 |
---|
| 433 | +++ newlib-1.18.0-rtems4.11-20100423/newlib/libc/include/string.h 2010-04-15 17:32:04.000000000 +0200 |
---|
| 434 | @@ -49,18 +49,11 @@ |
---|
| 435 | #ifndef __STRICT_ANSI__ |
---|
| 436 | char *_EXFUN(strtok_r,(char *, const char *, char **)); |
---|
| 437 | |
---|
| 438 | -int _EXFUN(bcmp,(const void *, const void *, size_t)); |
---|
| 439 | -void _EXFUN(bcopy,(const void *, void *, size_t)); |
---|
| 440 | -void _EXFUN(bzero,(void *, size_t)); |
---|
| 441 | -int _EXFUN(ffs,(int)); |
---|
| 442 | -char *_EXFUN(index,(const char *, int)); |
---|
| 443 | _PTR _EXFUN(memccpy,(_PTR, const _PTR, int, size_t)); |
---|
| 444 | _PTR _EXFUN(mempcpy,(_PTR, const _PTR, size_t)); |
---|
| 445 | _PTR _EXFUN(memmem, (const _PTR, size_t, const _PTR, size_t)); |
---|
| 446 | -char *_EXFUN(rindex,(const char *, int)); |
---|
| 447 | char *_EXFUN(stpcpy,(char *, const char *)); |
---|
| 448 | char *_EXFUN(stpncpy,(char *, const char *, size_t)); |
---|
| 449 | -int _EXFUN(strcasecmp,(const char *, const char *)); |
---|
| 450 | char *_EXFUN(strcasestr,(const char *, const char *)); |
---|
| 451 | char *_EXFUN(strdup,(const char *)); |
---|
| 452 | char *_EXFUN(_strdup_r,(struct _reent *, const char *)); |
---|
| 453 | @@ -69,7 +62,6 @@ |
---|
| 454 | char *_EXFUN(strerror_r,(int, char *, size_t)); |
---|
| 455 | size_t _EXFUN(strlcat,(char *, const char *, size_t)); |
---|
| 456 | size_t _EXFUN(strlcpy,(char *, const char *, size_t)); |
---|
| 457 | -int _EXFUN(strncasecmp,(const char *, const char *, size_t)); |
---|
| 458 | size_t _EXFUN(strnlen,(const char *, size_t)); |
---|
| 459 | char *_EXFUN(strsep,(char **, const char *)); |
---|
| 460 | char *_EXFUN(strlwr,(char *)); |
---|
| 461 | @@ -81,20 +73,6 @@ |
---|
| 462 | int _EXFUN(strtosigno, (const char *__name)); |
---|
| 463 | #endif |
---|
| 464 | |
---|
| 465 | -/* These function names are used on Windows and perhaps other systems. */ |
---|
| 466 | -#ifndef strcmpi |
---|
| 467 | -#define strcmpi strcasecmp |
---|
| 468 | -#endif |
---|
| 469 | -#ifndef stricmp |
---|
| 470 | -#define stricmp strcasecmp |
---|
| 471 | -#endif |
---|
| 472 | -#ifndef strncmpi |
---|
| 473 | -#define strncmpi strncasecmp |
---|
| 474 | -#endif |
---|
| 475 | -#ifndef strnicmp |
---|
| 476 | -#define strnicmp strncasecmp |
---|
| 477 | -#endif |
---|
| 478 | - |
---|
| 479 | #endif /* ! __STRICT_ANSI__ */ |
---|
| 480 | |
---|
| 481 | #include <sys/string.h> |
---|
| 482 | diff -Naur newlib-1.18.0.orig/newlib/libc/include/strings.h newlib-1.18.0-rtems4.11-20100423/newlib/libc/include/strings.h |
---|
| 483 | --- newlib-1.18.0.orig/newlib/libc/include/strings.h 1970-01-01 01:00:00.000000000 +0100 |
---|
| 484 | +++ newlib-1.18.0-rtems4.11-20100423/newlib/libc/include/strings.h 2010-04-15 17:32:04.000000000 +0200 |
---|
| 485 | @@ -0,0 +1,44 @@ |
---|
| 486 | +/* |
---|
| 487 | + * strings.h |
---|
| 488 | + * |
---|
| 489 | + * Definitions for string operations. |
---|
| 490 | + */ |
---|
| 491 | + |
---|
| 492 | +#ifndef _STRINGS_H_ |
---|
| 493 | +#define _STRINGS_H_ |
---|
| 494 | + |
---|
| 495 | +#include "_ansi.h" |
---|
| 496 | +#include <sys/reent.h> |
---|
| 497 | + |
---|
| 498 | +#include <sys/types.h> /* for size_t */ |
---|
| 499 | +#include <locale.h> /* for locale_t */ |
---|
| 500 | + |
---|
| 501 | +_BEGIN_STD_C |
---|
| 502 | + |
---|
| 503 | +#ifndef __STRICT_ANSI__ |
---|
| 504 | +/* |
---|
| 505 | + * Marked LEGACY in Open Group Base Specifications Issue 6/IEEE Std 1003.1-2004 |
---|
| 506 | + * Removed from Open Group Base Specifications Issue 7/IEEE Std 1003.1-2008 |
---|
| 507 | + */ |
---|
| 508 | +int _EXFUN(bcmp,(const void *, const void *, size_t)); |
---|
| 509 | +void _EXFUN(bcopy,(const void *, void *, size_t)); |
---|
| 510 | +void _EXFUN(bzero,(void *, size_t)); |
---|
| 511 | +char *_EXFUN(index,(const char *, int)); |
---|
| 512 | +char *_EXFUN(rindex,(const char *, int)); |
---|
| 513 | +#endif /* ! __STRICT_ANSI__ */ |
---|
| 514 | + |
---|
| 515 | +int _EXFUN(ffs,(int)); |
---|
| 516 | +int _EXFUN(strcasecmp,(const char *, const char *)); |
---|
| 517 | +#if 0 |
---|
| 518 | +/* Not implemented */ |
---|
| 519 | +int _EXFUN(strcasecmp_l,(const char *, const char *, locale_t)); |
---|
| 520 | +#endif |
---|
| 521 | +int _EXFUN(strncasecmp,(const char *, const char *, size_t)); |
---|
| 522 | +#if 0 |
---|
| 523 | +/* Not implemented */ |
---|
| 524 | +int _EXFUN(strncasecmp_l,(const char *, const char *, size_t, locale_t)); |
---|
| 525 | +#endif |
---|
| 526 | + |
---|
| 527 | +_END_STD_C |
---|
| 528 | + |
---|
| 529 | +#endif /* _STRINGS_H_ */ |
---|
| 530 | diff -Naur newlib-1.18.0.orig/newlib/libc/include/sys/sched.h newlib-1.18.0-rtems4.11-20100423/newlib/libc/include/sys/sched.h |
---|
| 531 | --- newlib-1.18.0.orig/newlib/libc/include/sys/sched.h 2002-06-20 21:51:24.000000000 +0200 |
---|
| 532 | +++ newlib-1.18.0-rtems4.11-20100423/newlib/libc/include/sys/sched.h 2010-04-15 17:32:04.000000000 +0200 |
---|
| 533 | @@ -1,7 +1,7 @@ |
---|
| 534 | /* |
---|
| 535 | * Written by Joel Sherrill <joel@OARcorp.com>. |
---|
| 536 | * |
---|
| 537 | - * COPYRIGHT (c) 1989-2000. |
---|
| 538 | + * COPYRIGHT (c) 1989-2010. |
---|
| 539 | * On-Line Applications Research Corporation (OAR). |
---|
| 540 | * |
---|
| 541 | * Permission to use, copy, modify, and distribute this software for any |
---|
| 542 | @@ -14,51 +14,53 @@ |
---|
| 543 | * OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY OF THIS |
---|
| 544 | * SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE. |
---|
| 545 | * |
---|
| 546 | - * $Id$ |
---|
| 547 | + * $Id$ |
---|
| 548 | */ |
---|
| 549 | |
---|
| 550 | |
---|
| 551 | -#ifndef __POSIX_SYS_SCHEDULING_h |
---|
| 552 | -#define __POSIX_SYS_SCHEDULING_h |
---|
| 553 | +#ifndef _SYS_SCHED_H_ |
---|
| 554 | +#define _SYS_SCHED_H_ |
---|
| 555 | |
---|
| 556 | #ifdef __cplusplus |
---|
| 557 | extern "C" { |
---|
| 558 | #endif |
---|
| 559 | |
---|
| 560 | -#include <sys/unistd.h> |
---|
| 561 | - |
---|
| 562 | -#include <sys/types.h> |
---|
| 563 | -#include <sys/time.h> |
---|
| 564 | - |
---|
| 565 | -/* Scheduling Policies, P1003.1b-1993, p. 250 |
---|
| 566 | - NOTE: SCHED_SPORADIC added by P1003.4b/D8, p. 34. */ |
---|
| 567 | - |
---|
| 568 | +/* Scheduling Policies */ |
---|
| 569 | +/* Open Group Specifications Issue 6 */ |
---|
| 570 | +#if defined(__CYGWIN__) |
---|
| 571 | +#define SCHED_OTHER 3 |
---|
| 572 | +#else |
---|
| 573 | #define SCHED_OTHER 0 |
---|
| 574 | +#endif |
---|
| 575 | + |
---|
| 576 | #define SCHED_FIFO 1 |
---|
| 577 | #define SCHED_RR 2 |
---|
| 578 | |
---|
| 579 | #if defined(_POSIX_SPORADIC_SERVER) |
---|
| 580 | -#define SCHED_SPORADIC 3 |
---|
| 581 | +#define SCHED_SPORADIC 4 |
---|
| 582 | #endif |
---|
| 583 | |
---|
| 584 | -/* Scheduling Parameters, P1003.1b-1993, p. 249 |
---|
| 585 | - NOTE: Fields whose name begins with "ss_" added by P1003.4b/D8, p. 33. */ |
---|
| 586 | +/* Scheduling Parameters */ |
---|
| 587 | +/* Open Group Specifications Issue 6 */ |
---|
| 588 | |
---|
| 589 | struct sched_param { |
---|
| 590 | int sched_priority; /* Process execution scheduling priority */ |
---|
| 591 | |
---|
| 592 | -#if defined(_POSIX_SPORADIC_SERVER) |
---|
| 593 | - int ss_low_priority; /* Low scheduling priority for sporadic */ |
---|
| 594 | +#if defined(_POSIX_SPORADIC_SERVER) || defined(_POSIX_THREAD_SPORADIC_SERVER) |
---|
| 595 | + int sched_ss_low_priority; /* Low scheduling priority for sporadic */ |
---|
| 596 | /* server */ |
---|
| 597 | - struct timespec ss_replenish_period; |
---|
| 598 | + struct timespec sched_ss_repl_period; |
---|
| 599 | /* Replenishment period for sporadic server */ |
---|
| 600 | - struct timespec ss_initial_budget; /* Initial budget for sporadic server */ |
---|
| 601 | + struct timespec sched_ss_init_budget; |
---|
| 602 | + /* Initial budget for sporadic server */ |
---|
| 603 | + int sched_ss_max_repl; /* Maximum pending replenishments for */ |
---|
| 604 | + /* sporadic server */ |
---|
| 605 | #endif |
---|
| 606 | }; |
---|
| 607 | |
---|
| 608 | #ifdef __cplusplus |
---|
| 609 | } |
---|
| 610 | -#endif |
---|
| 611 | +#endif |
---|
| 612 | |
---|
| 613 | #endif |
---|
| 614 | /* end of include file */ |
---|
| 615 | diff -Naur newlib-1.18.0.orig/newlib/libc/include/sys/types.h newlib-1.18.0-rtems4.11-20100423/newlib/libc/include/sys/types.h |
---|
| 616 | --- newlib-1.18.0.orig/newlib/libc/include/sys/types.h 2009-09-28 18:42:21.000000000 +0200 |
---|
| 617 | +++ newlib-1.18.0-rtems4.11-20100423/newlib/libc/include/sys/types.h 2010-04-15 17:50:09.000000000 +0200 |
---|
| 618 | @@ -176,7 +176,11 @@ |
---|
| 619 | #endif |
---|
| 620 | typedef _ssize_t ssize_t; |
---|
| 621 | |
---|
| 622 | -#ifndef __CYGWIN__ |
---|
| 623 | +#if defined(__rtems__) |
---|
[33747783] | 624 | +typedef _mode_t mode_t; |
---|
[76f2a2e] | 625 | +#endif |
---|
| 626 | + |
---|
| 627 | +#if !defined(__CYGWIN__) && !defined(__rtems__) |
---|
| 628 | #ifdef __MS_types__ |
---|
| 629 | typedef char * addr_t; |
---|
| 630 | typedef int mode_t; |
---|
| 631 | diff -Naur newlib-1.18.0.orig/newlib/libc/machine/powerpc/Makefile.am newlib-1.18.0-rtems4.11-20100423/newlib/libc/machine/powerpc/Makefile.am |
---|
| 632 | --- newlib-1.18.0.orig/newlib/libc/machine/powerpc/Makefile.am 2007-05-24 19:33:35.000000000 +0200 |
---|
| 633 | +++ newlib-1.18.0-rtems4.11-20100423/newlib/libc/machine/powerpc/Makefile.am 2010-04-15 17:32:04.000000000 +0200 |
---|
| 634 | @@ -10,7 +10,7 @@ |
---|
| 635 | |
---|
| 636 | AM_CFLAGS = -I $(srcdir)/../../stdio -I $(srcdir)/../../stdlib |
---|
| 637 | |
---|
| 638 | -lib_a_SOURCES = setjmp.S times.c |
---|
| 639 | +lib_a_SOURCES = setjmp.S |
---|
| 640 | lib_a_CCASFLAGS=$(AM_CCASFLAGS) |
---|
| 641 | lib_a_CFLAGS=$(AM_CFLAGS) |
---|
| 642 | lib_a_LIBADD = @extra_objs@ |
---|
| 643 | diff -Naur newlib-1.18.0.orig/newlib/libc/machine/powerpc/Makefile.in newlib-1.18.0-rtems4.11-20100423/newlib/libc/machine/powerpc/Makefile.in |
---|
| 644 | --- newlib-1.18.0.orig/newlib/libc/machine/powerpc/Makefile.in 2009-10-21 00:44:03.000000000 +0200 |
---|
| 645 | +++ newlib-1.18.0-rtems4.11-20100423/newlib/libc/machine/powerpc/Makefile.in 2010-04-15 17:32:04.000000000 +0200 |
---|
| 646 | @@ -51,7 +51,7 @@ |
---|
| 647 | LIBRARIES = $(noinst_LIBRARIES) |
---|
| 648 | ARFLAGS = cru |
---|
| 649 | lib_a_AR = $(AR) $(ARFLAGS) |
---|
| 650 | -am_lib_a_OBJECTS = lib_a-setjmp.$(OBJEXT) lib_a-times.$(OBJEXT) |
---|
| 651 | +am_lib_a_OBJECTS = lib_a-setjmp.$(OBJEXT) |
---|
| 652 | lib_a_OBJECTS = $(am_lib_a_OBJECTS) |
---|
| 653 | DEFAULT_INCLUDES = -I.@am__isrc@ |
---|
| 654 | depcomp = |
---|
| 655 | @@ -173,7 +173,7 @@ |
---|
| 656 | AM_CCASFLAGS = $(INCLUDES) |
---|
| 657 | noinst_LIBRARIES = lib.a |
---|
| 658 | AM_CFLAGS = -I $(srcdir)/../../stdio -I $(srcdir)/../../stdlib |
---|
| 659 | -lib_a_SOURCES = setjmp.S times.c |
---|
| 660 | +lib_a_SOURCES = setjmp.S |
---|
| 661 | lib_a_CCASFLAGS = $(AM_CCASFLAGS) |
---|
| 662 | lib_a_CFLAGS = $(AM_CFLAGS) |
---|
| 663 | lib_a_LIBADD = @extra_objs@ |
---|
| 664 | @@ -184,7 +184,7 @@ |
---|
| 665 | all: all-am |
---|
| 666 | |
---|
| 667 | .SUFFIXES: |
---|
| 668 | -.SUFFIXES: .S .c .o .obj |
---|
| 669 | +.SUFFIXES: .S .o .obj |
---|
| 670 | am--refresh: |
---|
| 671 | @: |
---|
| 672 | $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) |
---|
| 673 | @@ -245,18 +245,6 @@ |
---|
| 674 | lib_a-setjmp.obj: setjmp.S |
---|
| 675 | $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-setjmp.obj `if test -f 'setjmp.S'; then $(CYGPATH_W) 'setjmp.S'; else $(CYGPATH_W) '$(srcdir)/setjmp.S'; fi` |
---|
| 676 | |
---|
| 677 | -.c.o: |
---|
| 678 | - $(COMPILE) -c $< |
---|
| 679 | - |
---|
| 680 | -.c.obj: |
---|
| 681 | - $(COMPILE) -c `$(CYGPATH_W) '$<'` |
---|
| 682 | - |
---|
| 683 | -lib_a-times.o: times.c |
---|
| 684 | - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-times.o `test -f 'times.c' || echo '$(srcdir)/'`times.c |
---|
| 685 | - |
---|
| 686 | -lib_a-times.obj: times.c |
---|
| 687 | - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-times.obj `if test -f 'times.c'; then $(CYGPATH_W) 'times.c'; else $(CYGPATH_W) '$(srcdir)/times.c'; fi` |
---|
| 688 | - |
---|
| 689 | ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) |
---|
| 690 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ |
---|
| 691 | unique=`for i in $$list; do \ |
---|
| 692 | diff -Naur newlib-1.18.0.orig/newlib/libc/machine/powerpc/times.c newlib-1.18.0-rtems4.11-20100423/newlib/libc/machine/powerpc/times.c |
---|
| 693 | --- newlib-1.18.0.orig/newlib/libc/machine/powerpc/times.c 2002-07-22 22:26:51.000000000 +0200 |
---|
| 694 | +++ newlib-1.18.0-rtems4.11-20100423/newlib/libc/machine/powerpc/times.c 1970-01-01 01:00:00.000000000 +0100 |
---|
| 695 | @@ -1,36 +0,0 @@ |
---|
| 696 | -/* Time support routines for PowerPC. |
---|
| 697 | - * |
---|
| 698 | - * Written by Aldy Hernandez. |
---|
| 699 | - */ |
---|
| 700 | - |
---|
| 701 | -#include <_ansi.h> |
---|
| 702 | -#include <reent.h> |
---|
| 703 | -#include <sys/time.h> |
---|
| 704 | -#include <sys/times.h> |
---|
| 705 | -#include <sys/resource.h> |
---|
| 706 | - |
---|
| 707 | -clock_t |
---|
| 708 | -times (struct tms *tp) |
---|
| 709 | -{ |
---|
| 710 | - struct rusage usage; |
---|
| 711 | - union { |
---|
| 712 | - struct rusage r; |
---|
| 713 | - /* Newlib's rusage has only 2 fields. We need to make room for |
---|
| 714 | - when we call the system's rusage. This should be enough. */ |
---|
| 715 | - int filler[32]; |
---|
| 716 | - } host_ru; |
---|
| 717 | - |
---|
| 718 | - getrusage (RUSAGE_SELF, (void *)&host_ru); |
---|
| 719 | - |
---|
| 720 | - if (tp) |
---|
| 721 | - { |
---|
| 722 | - tp->tms_utime = host_ru.r.ru_utime.tv_sec * 1000 |
---|
| 723 | - + host_ru.r.ru_utime.tv_usec; |
---|
| 724 | - tp->tms_stime = host_ru.r.ru_stime.tv_sec * 1000 |
---|
| 725 | - + host_ru.r.ru_stime.tv_usec; |
---|
| 726 | - tp->tms_cutime = 0; /* user time, children */ |
---|
| 727 | - tp->tms_cstime = 0; /* system time, children */ |
---|
| 728 | - } |
---|
| 729 | - |
---|
| 730 | - return tp->tms_utime; |
---|
| 731 | -} |
---|
| 732 | diff -Naur newlib-1.18.0.orig/newlib/libc/misc/ffs.c newlib-1.18.0-rtems4.11-20100423/newlib/libc/misc/ffs.c |
---|
| 733 | --- newlib-1.18.0.orig/newlib/libc/misc/ffs.c 2003-06-06 21:57:51.000000000 +0200 |
---|
| 734 | +++ newlib-1.18.0-rtems4.11-20100423/newlib/libc/misc/ffs.c 2010-04-15 17:32:04.000000000 +0200 |
---|
| 735 | @@ -24,7 +24,7 @@ |
---|
| 736 | |
---|
| 737 | No supporting OS subroutines are required. */ |
---|
| 738 | |
---|
| 739 | -#include <_ansi.h> |
---|
| 740 | +#include <strings.h> |
---|
| 741 | |
---|
| 742 | int |
---|
| 743 | _DEFUN(ffs, (word), |
---|
| 744 | diff -Naur newlib-1.18.0.orig/newlib/libc/posix/telldir.c newlib-1.18.0-rtems4.11-20100423/newlib/libc/posix/telldir.c |
---|
| 745 | --- newlib-1.18.0.orig/newlib/libc/posix/telldir.c 2008-11-27 22:01:40.000000000 +0100 |
---|
| 746 | +++ newlib-1.18.0-rtems4.11-20100423/newlib/libc/posix/telldir.c 2010-04-15 17:32:04.000000000 +0200 |
---|
| 747 | @@ -67,7 +67,7 @@ |
---|
| 748 | #define NDIRHASH 32 /* Num of hash lists, must be a power of 2 */ |
---|
| 749 | #define LOCHASH(i) ((i)&(NDIRHASH-1)) |
---|
| 750 | |
---|
| 751 | -static long dd_loccnt; /* Index of entry for sequential readdir's */ |
---|
| 752 | +static long dd_loccnt = 1; /* Index of entry for sequential readdir's */ |
---|
| 753 | static struct ddloc *dd_hash[NDIRHASH]; /* Hash list heads for ddlocs */ |
---|
| 754 | __LOCK_INIT(static, dd_hash_lock); |
---|
| 755 | |
---|
| 756 | @@ -119,40 +119,46 @@ |
---|
| 757 | register struct ddloc *lp; |
---|
| 758 | register struct ddloc **prevlp; |
---|
| 759 | struct dirent *dp; |
---|
| 760 | - extern long lseek(); |
---|
| 761 | |
---|
| 762 | #ifdef HAVE_DD_LOCK |
---|
| 763 | __lock_acquire(dd_hash_lock); |
---|
| 764 | #endif |
---|
| 765 | - prevlp = &dd_hash[LOCHASH(loc)]; |
---|
| 766 | - lp = *prevlp; |
---|
| 767 | - while (lp != NULL) { |
---|
| 768 | - if (lp->loc_index == loc) |
---|
| 769 | - break; |
---|
| 770 | - prevlp = &lp->loc_next; |
---|
| 771 | - lp = lp->loc_next; |
---|
| 772 | - } |
---|
| 773 | - if (lp == NULL) { |
---|
| 774 | + if (loc != 0) { |
---|
| 775 | + prevlp = &dd_hash[LOCHASH(loc)]; |
---|
| 776 | + lp = *prevlp; |
---|
| 777 | + while (lp != NULL) { |
---|
| 778 | + if (lp->loc_index == loc) |
---|
| 779 | + break; |
---|
| 780 | + prevlp = &lp->loc_next; |
---|
| 781 | + lp = lp->loc_next; |
---|
| 782 | + } |
---|
| 783 | + if (lp == NULL) { |
---|
| 784 | #ifdef HAVE_DD_LOCK |
---|
| 785 | - __lock_release(dd_hash_lock); |
---|
| 786 | + __lock_release(dd_hash_lock); |
---|
| 787 | #endif |
---|
| 788 | - return; |
---|
| 789 | - } |
---|
| 790 | - if (lp->loc_loc == dirp->dd_loc && lp->loc_seek == dirp->dd_seek) |
---|
| 791 | - goto found; |
---|
| 792 | - (void) lseek(dirp->dd_fd, lp->loc_seek, 0); |
---|
| 793 | - dirp->dd_seek = lp->loc_seek; |
---|
| 794 | - dirp->dd_loc = 0; |
---|
| 795 | - while (dirp->dd_loc < lp->loc_loc) { |
---|
| 796 | - dp = readdir(dirp); |
---|
| 797 | - if (dp == NULL) |
---|
| 798 | - break; |
---|
| 799 | - } |
---|
| 800 | + return; |
---|
| 801 | + } |
---|
| 802 | + if (lp->loc_loc == dirp->dd_loc && lp->loc_seek == dirp->dd_seek) |
---|
| 803 | + goto found; |
---|
| 804 | + (void) lseek(dirp->dd_fd, lp->loc_seek, 0); |
---|
| 805 | + dirp->dd_seek = lp->loc_seek; |
---|
| 806 | + dirp->dd_loc = 0; |
---|
| 807 | + while (dirp->dd_loc < lp->loc_loc) { |
---|
| 808 | + dp = readdir(dirp); |
---|
| 809 | + if (dp == NULL) |
---|
| 810 | + break; |
---|
| 811 | + } |
---|
| 812 | found: |
---|
| 813 | #ifdef SINGLEUSE |
---|
| 814 | - *prevlp = lp->loc_next; |
---|
| 815 | - free((caddr_t)lp); |
---|
| 816 | + *prevlp = lp->loc_next; |
---|
| 817 | + free((caddr_t)lp); |
---|
| 818 | #endif |
---|
| 819 | + } else { |
---|
| 820 | + // loc 0 means rewinding |
---|
| 821 | + (void) lseek(dirp->dd_fd, 0, 0); |
---|
| 822 | + dirp->dd_seek = 0; |
---|
| 823 | + dirp->dd_loc = 0; |
---|
| 824 | + } |
---|
| 825 | #ifdef HAVE_DD_LOCK |
---|
| 826 | __lock_release(dd_hash_lock); |
---|
| 827 | #endif |
---|
| 828 | @@ -169,26 +175,26 @@ |
---|
| 829 | __lock_acquire(dd_hash_lock); |
---|
| 830 | #endif |
---|
| 831 | for (i = 0; i < NDIRHASH; ++i) { |
---|
| 832 | + struct ddloc head; |
---|
| 833 | register struct ddloc *lp; |
---|
| 834 | register struct ddloc *prevlp; |
---|
| 835 | + |
---|
| 836 | lp = dd_hash[i]; |
---|
| 837 | - while (lp != NULL && lp->loc_dirp == dirp) { |
---|
| 838 | - dd_hash[i] = lp->loc_next; |
---|
| 839 | - prevlp = lp; |
---|
| 840 | - free((caddr_t)lp); |
---|
| 841 | - lp = prevlp->loc_next; |
---|
| 842 | - } |
---|
| 843 | - prevlp = lp; |
---|
| 844 | + head.loc_next = lp; |
---|
| 845 | + prevlp = &head; |
---|
| 846 | while (lp != NULL) { |
---|
| 847 | - lp = lp->loc_next; |
---|
| 848 | - if (lp != NULL && lp->loc_dirp == dirp) { |
---|
| 849 | - prevlp->loc_next = lp->loc_next; |
---|
| 850 | + struct ddloc *nextlp; |
---|
| 851 | + |
---|
| 852 | + nextlp = lp->loc_next; |
---|
| 853 | + if (lp->loc_dirp == dirp) { |
---|
| 854 | + prevlp->loc_next = nextlp; |
---|
| 855 | free((caddr_t)lp); |
---|
| 856 | - lp = prevlp; |
---|
| 857 | } |
---|
| 858 | else |
---|
| 859 | prevlp = lp; |
---|
| 860 | + lp = nextlp; |
---|
| 861 | } |
---|
| 862 | + dd_hash[i] = head.loc_next; |
---|
| 863 | } |
---|
| 864 | #ifdef HAVE_DD_LOCK |
---|
| 865 | __lock_release(dd_hash_lock); |
---|
| 866 | diff -Naur newlib-1.18.0.orig/newlib/libc/search/db_local.h newlib-1.18.0-rtems4.11-20100423/newlib/libc/search/db_local.h |
---|
| 867 | --- newlib-1.18.0.orig/newlib/libc/search/db_local.h 2002-06-25 01:05:08.000000000 +0200 |
---|
| 868 | +++ newlib-1.18.0-rtems4.11-20100423/newlib/libc/search/db_local.h 2010-04-15 17:32:04.000000000 +0200 |
---|
| 869 | @@ -102,11 +102,11 @@ |
---|
| 870 | typedef struct __db { |
---|
| 871 | DBTYPE type; /* Underlying db type. */ |
---|
| 872 | int (*close)(struct __db *); |
---|
| 873 | - int (*del)(const struct __db *, const DBT *, u_int); |
---|
| 874 | - int (*get)(const struct __db *, const DBT *, DBT *, u_int); |
---|
| 875 | - int (*put)(const struct __db *, DBT *, const DBT *, u_int); |
---|
| 876 | - int (*seq)(const struct __db *, DBT *, DBT *, u_int); |
---|
| 877 | - int (*sync)(const struct __db *, u_int); |
---|
| 878 | + int (*del)(const struct __db *, const DBT *, __uint32_t); |
---|
| 879 | + int (*get)(const struct __db *, const DBT *, DBT *, __uint32_t); |
---|
| 880 | + int (*put)(const struct __db *, DBT *, const DBT *, __uint32_t); |
---|
| 881 | + int (*seq)(const struct __db *, DBT *, DBT *, __uint32_t); |
---|
| 882 | + int (*sync)(const struct __db *, __uint32_t); |
---|
| 883 | void *internal; /* Access method private. */ |
---|
| 884 | int (*fd)(const struct __db *); |
---|
| 885 | } DB; |
---|
| 886 | diff -Naur newlib-1.18.0.orig/newlib/libc/search/extern.h newlib-1.18.0-rtems4.11-20100423/newlib/libc/search/extern.h |
---|
| 887 | --- newlib-1.18.0.orig/newlib/libc/search/extern.h 2002-06-20 21:51:31.000000000 +0200 |
---|
| 888 | +++ newlib-1.18.0-rtems4.11-20100423/newlib/libc/search/extern.h 2010-04-15 17:32:04.000000000 +0200 |
---|
| 889 | @@ -43,7 +43,7 @@ |
---|
| 890 | int __big_split(HTAB *, BUFHEAD *, BUFHEAD *, BUFHEAD *, |
---|
| 891 | int, __uint32_t, SPLIT_RETURN *); |
---|
| 892 | int __buf_free(HTAB *, int, int); |
---|
| 893 | -void __buf_init(HTAB *, int); |
---|
| 894 | +void __buf_init(HTAB *, __uint32_t); |
---|
| 895 | __uint32_t __call_hash(HTAB *, char *, int); |
---|
| 896 | int __delpair(HTAB *, BUFHEAD *, int); |
---|
| 897 | int __expand_table(HTAB *); |
---|
| 898 | diff -Naur newlib-1.18.0.orig/newlib/libc/search/hash_buf.c newlib-1.18.0-rtems4.11-20100423/newlib/libc/search/hash_buf.c |
---|
| 899 | --- newlib-1.18.0.orig/newlib/libc/search/hash_buf.c 2004-05-26 19:57:10.000000000 +0200 |
---|
| 900 | +++ newlib-1.18.0-rtems4.11-20100423/newlib/libc/search/hash_buf.c 2010-04-15 17:32:04.000000000 +0200 |
---|
| 901 | @@ -118,7 +118,7 @@ |
---|
| 902 | int newpage; /* If prev_bp set, indicates a new overflow page. */ |
---|
| 903 | { |
---|
| 904 | BUFHEAD *bp; |
---|
| 905 | - __uint32_t is_disk_mask; |
---|
| 906 | + ptrdiff_t is_disk_mask; |
---|
| 907 | int is_disk, segment_ndx; |
---|
| 908 | SEGMENT segp; |
---|
| 909 | |
---|
| 910 | @@ -298,7 +298,7 @@ |
---|
| 911 | extern void |
---|
| 912 | __buf_init(hashp, nbytes) |
---|
| 913 | HTAB *hashp; |
---|
| 914 | - int nbytes; |
---|
| 915 | + __uint32_t nbytes; |
---|
| 916 | { |
---|
| 917 | BUFHEAD *bfp; |
---|
| 918 | int npages; |
---|
| 919 | diff -Naur newlib-1.18.0.orig/newlib/libc/search/hash.h newlib-1.18.0-rtems4.11-20100423/newlib/libc/search/hash.h |
---|
| 920 | --- newlib-1.18.0.orig/newlib/libc/search/hash.h 2008-07-02 20:38:45.000000000 +0200 |
---|
| 921 | +++ newlib-1.18.0-rtems4.11-20100423/newlib/libc/search/hash.h 2010-04-15 17:32:04.000000000 +0200 |
---|
| 922 | @@ -82,7 +82,7 @@ |
---|
| 923 | |
---|
| 924 | /* Hash Table Information */ |
---|
| 925 | typedef struct hashhdr { /* Disk resident portion */ |
---|
| 926 | - int magic; /* Magic NO for hash tables */ |
---|
| 927 | + __uint32_t magic; /* Magic NO for hash tables */ |
---|
| 928 | int version; /* Version ID */ |
---|
| 929 | __uint32_t lorder; /* Byte Order */ |
---|
| 930 | int bsize; /* Bucket/Page Size */ |
---|
| 931 | @@ -97,7 +97,7 @@ |
---|
| 932 | int high_mask; /* Mask to modulo into entire table */ |
---|
| 933 | int low_mask; /* Mask to modulo into lower half of |
---|
| 934 | * table */ |
---|
| 935 | - int ffactor; /* Fill factor */ |
---|
| 936 | + __uint32_t ffactor; /* Fill factor */ |
---|
| 937 | int nkeys; /* Number of keys in hash table */ |
---|
| 938 | int hdrpages; /* Size of table header */ |
---|
| 939 | int h_charkey; /* value of hash(CHARKEY) */ |
---|
| 940 | diff -Naur newlib-1.18.0.orig/newlib/libc/string/bcmp.c newlib-1.18.0-rtems4.11-20100423/newlib/libc/string/bcmp.c |
---|
| 941 | --- newlib-1.18.0.orig/newlib/libc/string/bcmp.c 2005-10-28 23:21:07.000000000 +0200 |
---|
| 942 | +++ newlib-1.18.0-rtems4.11-20100423/newlib/libc/string/bcmp.c 2010-04-15 17:32:04.000000000 +0200 |
---|
| 943 | @@ -6,11 +6,11 @@ |
---|
| 944 | bcmp |
---|
| 945 | |
---|
| 946 | ANSI_SYNOPSIS |
---|
| 947 | - #include <string.h> |
---|
| 948 | + #include <strings.h> |
---|
| 949 | int bcmp(const void *<[s1]>, const void *<[s2]>, size_t <[n]>); |
---|
| 950 | |
---|
| 951 | TRAD_SYNOPSIS |
---|
| 952 | - #include <string.h> |
---|
| 953 | + #include <strings.h> |
---|
| 954 | int bcmp(<[s1]>, <[s2]>, <[n]>) |
---|
| 955 | const void *<[s1]>; |
---|
| 956 | const void *<[s2]>; |
---|
| 957 | @@ -35,7 +35,7 @@ |
---|
| 958 | bcmp ansi pure |
---|
| 959 | */ |
---|
| 960 | |
---|
| 961 | -#include <string.h> |
---|
| 962 | +#include <strings.h> |
---|
| 963 | |
---|
| 964 | int |
---|
| 965 | _DEFUN (bcmp, (m1, m2, n), |
---|
| 966 | diff -Naur newlib-1.18.0.orig/newlib/libc/string/bcopy.c newlib-1.18.0-rtems4.11-20100423/newlib/libc/string/bcopy.c |
---|
| 967 | --- newlib-1.18.0.orig/newlib/libc/string/bcopy.c 2002-05-23 20:46:04.000000000 +0200 |
---|
| 968 | +++ newlib-1.18.0-rtems4.11-20100423/newlib/libc/string/bcopy.c 2010-04-15 17:32:04.000000000 +0200 |
---|
| 969 | @@ -3,7 +3,7 @@ |
---|
| 970 | <<bcopy>>---copy memory regions |
---|
| 971 | |
---|
| 972 | ANSI_SYNOPSIS |
---|
| 973 | - #include <string.h> |
---|
| 974 | + #include <strings.h> |
---|
| 975 | void bcopy(const void *<[in]>, void *<[out]>, size_t <[n]>); |
---|
| 976 | |
---|
| 977 | TRAD_SYNOPSIS |
---|
| 978 | @@ -26,7 +26,7 @@ |
---|
| 979 | bcopy - pure |
---|
| 980 | */ |
---|
| 981 | |
---|
| 982 | -#include <string.h> |
---|
| 983 | +#include <strings.h> |
---|
| 984 | |
---|
| 985 | void |
---|
| 986 | _DEFUN (bcopy, (b1, b2, length), |
---|
| 987 | diff -Naur newlib-1.18.0.orig/newlib/libc/string/bzero.c newlib-1.18.0-rtems4.11-20100423/newlib/libc/string/bzero.c |
---|
| 988 | --- newlib-1.18.0.orig/newlib/libc/string/bzero.c 2002-05-23 20:46:04.000000000 +0200 |
---|
| 989 | +++ newlib-1.18.0-rtems4.11-20100423/newlib/libc/string/bzero.c 2010-04-15 17:32:04.000000000 +0200 |
---|
| 990 | @@ -6,11 +6,11 @@ |
---|
| 991 | bzero |
---|
| 992 | |
---|
| 993 | ANSI_SYNOPSIS |
---|
| 994 | - #include <string.h> |
---|
| 995 | + #include <strings.h> |
---|
| 996 | void bzero(void *<[b]>, size_t <[length]>); |
---|
| 997 | |
---|
| 998 | TRAD_SYNOPSIS |
---|
| 999 | - #include <string.h> |
---|
| 1000 | + #include <strings.h> |
---|
| 1001 | void bzero(<[b]>, <[length]>) |
---|
| 1002 | void *<[b]>; |
---|
| 1003 | size_t <[length]>; |
---|
| 1004 | @@ -30,7 +30,7 @@ |
---|
| 1005 | <<bzero>> requires no supporting OS subroutines. |
---|
| 1006 | */ |
---|
| 1007 | |
---|
| 1008 | -#include <string.h> |
---|
| 1009 | +#include <strings.h> |
---|
| 1010 | |
---|
| 1011 | _VOID |
---|
| 1012 | _DEFUN (bzero, (b, length), |
---|
| 1013 | diff -Naur newlib-1.18.0.orig/newlib/libc/string/index.c newlib-1.18.0-rtems4.11-20100423/newlib/libc/string/index.c |
---|
| 1014 | --- newlib-1.18.0.orig/newlib/libc/string/index.c 2000-02-17 20:39:48.000000000 +0100 |
---|
| 1015 | +++ newlib-1.18.0-rtems4.11-20100423/newlib/libc/string/index.c 2010-04-15 17:32:04.000000000 +0200 |
---|
| 1016 | @@ -10,7 +10,7 @@ |
---|
| 1017 | char * index(const char *<[string]>, int <[c]>); |
---|
| 1018 | |
---|
| 1019 | TRAD_SYNOPSIS |
---|
| 1020 | - #include <string.h> |
---|
| 1021 | + #include <strings.h> |
---|
| 1022 | char * index(<[string]>, <[c]>); |
---|
| 1023 | char *<[string]>; |
---|
| 1024 | int *<[c]>; |
---|
| 1025 | @@ -33,7 +33,7 @@ |
---|
| 1026 | index - pure |
---|
| 1027 | */ |
---|
| 1028 | |
---|
| 1029 | -#include <string.h> |
---|
| 1030 | +#include <strings.h> |
---|
| 1031 | |
---|
| 1032 | char * |
---|
| 1033 | _DEFUN (index, (s, c), |
---|
| 1034 | diff -Naur newlib-1.18.0.orig/newlib/libc/string/rindex.c newlib-1.18.0-rtems4.11-20100423/newlib/libc/string/rindex.c |
---|
| 1035 | --- newlib-1.18.0.orig/newlib/libc/string/rindex.c 2000-02-17 20:39:48.000000000 +0100 |
---|
| 1036 | +++ newlib-1.18.0-rtems4.11-20100423/newlib/libc/string/rindex.c 2010-04-15 17:32:04.000000000 +0200 |
---|
| 1037 | @@ -10,7 +10,7 @@ |
---|
| 1038 | char * rindex(const char *<[string]>, int <[c]>); |
---|
| 1039 | |
---|
| 1040 | TRAD_SYNOPSIS |
---|
| 1041 | - #include <string.h> |
---|
| 1042 | + #include <strings.h> |
---|
| 1043 | char * rindex(<[string]>, <[c]>); |
---|
| 1044 | char *<[string]>; |
---|
| 1045 | int *<[c]>; |
---|
| 1046 | @@ -33,7 +33,7 @@ |
---|
| 1047 | rindex - pure |
---|
| 1048 | */ |
---|
| 1049 | |
---|
| 1050 | -#include <string.h> |
---|
| 1051 | +#include <strings.h> |
---|
| 1052 | |
---|
| 1053 | char * |
---|
| 1054 | _DEFUN (rindex, (s, c), |
---|
| 1055 | diff -Naur newlib-1.18.0.orig/newlib/libc/string/strcasecmp.c newlib-1.18.0-rtems4.11-20100423/newlib/libc/string/strcasecmp.c |
---|
| 1056 | --- newlib-1.18.0.orig/newlib/libc/string/strcasecmp.c 2009-04-23 20:11:22.000000000 +0200 |
---|
| 1057 | +++ newlib-1.18.0-rtems4.11-20100423/newlib/libc/string/strcasecmp.c 2010-04-15 17:32:04.000000000 +0200 |
---|
| 1058 | @@ -38,7 +38,7 @@ |
---|
| 1059 | strcasecmp |
---|
| 1060 | */ |
---|
| 1061 | |
---|
| 1062 | -#include <string.h> |
---|
| 1063 | +#include <strings.h> |
---|
| 1064 | #include <ctype.h> |
---|
| 1065 | |
---|
| 1066 | int |
---|
| 1067 | diff -Naur newlib-1.18.0.orig/newlib/libc/string/strncasecmp.c newlib-1.18.0-rtems4.11-20100423/newlib/libc/string/strncasecmp.c |
---|
| 1068 | --- newlib-1.18.0.orig/newlib/libc/string/strncasecmp.c 2009-04-23 20:11:22.000000000 +0200 |
---|
| 1069 | +++ newlib-1.18.0-rtems4.11-20100423/newlib/libc/string/strncasecmp.c 2010-04-15 17:32:04.000000000 +0200 |
---|
| 1070 | @@ -6,11 +6,11 @@ |
---|
| 1071 | strncasecmp |
---|
| 1072 | |
---|
| 1073 | ANSI_SYNOPSIS |
---|
| 1074 | - #include <string.h> |
---|
| 1075 | + #include <strings.h> |
---|
| 1076 | int strncasecmp(const char *<[a]>, const char * <[b]>, size_t <[length]>); |
---|
| 1077 | |
---|
| 1078 | TRAD_SYNOPSIS |
---|
| 1079 | - #include <string.h> |
---|
| 1080 | + #include <strings.h> |
---|
| 1081 | int strncasecmp(<[a]>, <[b]>, <[length]>) |
---|
| 1082 | char *<[a]>; |
---|
| 1083 | char *<[b]>; |
---|
| 1084 | @@ -40,7 +40,7 @@ |
---|
| 1085 | strncasecmp |
---|
| 1086 | */ |
---|
| 1087 | |
---|
| 1088 | -#include <string.h> |
---|
| 1089 | +#include <strings.h> |
---|
| 1090 | #include <ctype.h> |
---|
| 1091 | |
---|
| 1092 | int |
---|
| 1093 | diff -Naur newlib-1.18.0.orig/newlib/libc/sys/rtems/machine/_types.h newlib-1.18.0-rtems4.11-20100423/newlib/libc/sys/rtems/machine/_types.h |
---|
| 1094 | --- newlib-1.18.0.orig/newlib/libc/sys/rtems/machine/_types.h 2009-12-17 17:10:41.000000000 +0100 |
---|
[a0c2e9f] | 1095 | +++ newlib-1.18.0-rtems4.11-20100423/newlib/libc/sys/rtems/machine/_types.h 2010-04-24 04:37:28.000000000 +0200 |
---|
[76f2a2e] | 1096 | @@ -31,4 +31,25 @@ |
---|
| 1097 | |
---|
| 1098 | typedef __int32_t blksize_t; |
---|
| 1099 | typedef __int32_t blkcnt_t; |
---|
| 1100 | + |
---|
| 1101 | +/* EXPERIMENTAL: Use 64bit types */ |
---|
| 1102 | +#if defined(__arm__) || defined(__i386__) || defined(__m68k__) || defined(__mips__) || defined(__PPC__) || defined(__sparc__) |
---|
| 1103 | +/* Use 64bit types */ |
---|
| 1104 | +typedef __int64_t _off_t; |
---|
| 1105 | +#define __off_t_defined 1 |
---|
| 1106 | + |
---|
| 1107 | +typedef __int64_t _fpos_t; |
---|
| 1108 | +#define __fpos_t_defined 1 |
---|
| 1109 | +#else |
---|
| 1110 | +/* Use 32bit types */ |
---|
| 1111 | +typedef __int32_t _off_t; |
---|
| 1112 | +#define __off_t_defined 1 |
---|
| 1113 | + |
---|
| 1114 | +typedef __int32_t _fpos_t; |
---|
| 1115 | +#define __fpos_t_defined 1 |
---|
| 1116 | +#endif |
---|
| 1117 | + |
---|
[a0c2e9f] | 1118 | +typedef __uint32_t _mode_t; |
---|
[76f2a2e] | 1119 | +#define __mode_t_defined 1 |
---|
| 1120 | + |
---|
| 1121 | #endif |
---|
| 1122 | diff -Naur newlib-1.18.0.orig/newlib/libm/common/modfl.c newlib-1.18.0-rtems4.11-20100423/newlib/libm/common/modfl.c |
---|
| 1123 | --- newlib-1.18.0.orig/newlib/libm/common/modfl.c 2009-04-18 00:15:43.000000000 +0200 |
---|
| 1124 | +++ newlib-1.18.0-rtems4.11-20100423/newlib/libm/common/modfl.c 2010-04-15 17:32:04.000000000 +0200 |
---|
| 1125 | @@ -36,7 +36,7 @@ |
---|
| 1126 | long double |
---|
| 1127 | modfl (long double x, long double *iptr) |
---|
| 1128 | { |
---|
| 1129 | - return modf(x, iptr); |
---|
| 1130 | + return modf(x, (double*) iptr); |
---|
| 1131 | } |
---|
| 1132 | #endif |
---|
| 1133 | |
---|
| 1134 | diff -Naur newlib-1.18.0.orig/newlib/libm/common/sf_llrint.c newlib-1.18.0-rtems4.11-20100423/newlib/libm/common/sf_llrint.c |
---|
| 1135 | --- newlib-1.18.0.orig/newlib/libm/common/sf_llrint.c 2009-04-03 19:39:24.000000000 +0200 |
---|
| 1136 | +++ newlib-1.18.0-rtems4.11-20100423/newlib/libm/common/sf_llrint.c 2010-04-15 17:32:04.000000000 +0200 |
---|
| 1137 | @@ -71,7 +71,7 @@ |
---|
| 1138 | GET_FLOAT_WORD (i0, t); |
---|
| 1139 | /* Detect the all-zeros representation of plus and |
---|
| 1140 | minus zero, which fails the calculation below. */ |
---|
| 1141 | - if ((i0 & ~(1 << 31)) == 0) |
---|
| 1142 | + if ((i0 & ~((__uint32_t)1 << 31)) == 0) |
---|
| 1143 | return 0; |
---|
| 1144 | j0 = ((i0 >> 23) & 0xff) - 0x7f; |
---|
| 1145 | i0 &= 0x7fffff; |
---|
| 1146 | diff -Naur newlib-1.18.0.orig/newlib/libm/common/sf_round.c newlib-1.18.0-rtems4.11-20100423/newlib/libm/common/sf_round.c |
---|
| 1147 | --- newlib-1.18.0.orig/newlib/libm/common/sf_round.c 2005-02-24 20:02:35.000000000 +0100 |
---|
| 1148 | +++ newlib-1.18.0-rtems4.11-20100423/newlib/libm/common/sf_round.c 2010-04-15 17:32:04.000000000 +0200 |
---|
| 1149 | @@ -38,7 +38,7 @@ |
---|
| 1150 | w &= 0x80000000; |
---|
| 1151 | if (exponent_less_127 == -1) |
---|
| 1152 | /* Result is +1.0 or -1.0. */ |
---|
| 1153 | - w |= (127 << 23); |
---|
| 1154 | + w |= ((__uint32_t)127 << 23); |
---|
| 1155 | } |
---|
| 1156 | else |
---|
| 1157 | { |
---|
| 1158 | diff -Naur newlib-1.18.0.orig/newlib/Makefile.am newlib-1.18.0-rtems4.11-20100423/newlib/Makefile.am |
---|
| 1159 | --- newlib-1.18.0.orig/newlib/Makefile.am 2009-08-18 23:48:05.000000000 +0200 |
---|
| 1160 | +++ newlib-1.18.0-rtems4.11-20100423/newlib/Makefile.am 2010-04-15 17:32:04.000000000 +0200 |
---|
| 1161 | @@ -81,7 +81,7 @@ |
---|
| 1162 | libc.a |
---|
| 1163 | endif |
---|
| 1164 | |
---|
| 1165 | -noinst_DATA = stmp-targ-include |
---|
| 1166 | +BUILT_SOURCES = stmp-targ-include |
---|
| 1167 | |
---|
| 1168 | toollib_DATA = $(CRT0) $(CRT1) |
---|
| 1169 | |
---|
| 1170 | diff -Naur newlib-1.18.0.orig/newlib/Makefile.in newlib-1.18.0-rtems4.11-20100423/newlib/Makefile.in |
---|
| 1171 | --- newlib-1.18.0.orig/newlib/Makefile.in 2009-10-21 00:43:45.000000000 +0200 |
---|
| 1172 | +++ newlib-1.18.0-rtems4.11-20100423/newlib/Makefile.in 2010-04-15 17:32:04.000000000 +0200 |
---|
| 1173 | @@ -122,7 +122,7 @@ |
---|
| 1174 | install-pdf-recursive install-ps-recursive install-recursive \ |
---|
| 1175 | installcheck-recursive installdirs-recursive pdf-recursive \ |
---|
| 1176 | ps-recursive uninstall-recursive |
---|
| 1177 | -DATA = $(noinst_DATA) $(toollib_DATA) |
---|
| 1178 | +DATA = $(toollib_DATA) |
---|
| 1179 | RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ |
---|
| 1180 | distclean-recursive maintainer-clean-recursive |
---|
| 1181 | AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ |
---|
| 1182 | @@ -351,7 +351,7 @@ |
---|
| 1183 | @USE_LIBTOOL_FALSE@toollib_LIBRARIES = libm.a \ |
---|
| 1184 | @USE_LIBTOOL_FALSE@ libc.a |
---|
| 1185 | |
---|
| 1186 | -noinst_DATA = stmp-targ-include |
---|
| 1187 | +BUILT_SOURCES = stmp-targ-include |
---|
| 1188 | toollib_DATA = $(CRT0) $(CRT1) |
---|
| 1189 | |
---|
| 1190 | # The functions ldexp, frexp and modf are traditionally supplied in |
---|
| 1191 | @@ -411,7 +411,7 @@ |
---|
| 1192 | |
---|
| 1193 | # dejagnu support |
---|
| 1194 | RUNTESTFLAGS = |
---|
| 1195 | -all: newlib.h |
---|
| 1196 | +all: $(BUILT_SOURCES) newlib.h |
---|
| 1197 | $(MAKE) $(AM_MAKEFLAGS) all-recursive |
---|
| 1198 | |
---|
| 1199 | .SUFFIXES: |
---|
| 1200 | @@ -725,14 +725,16 @@ |
---|
| 1201 | done |
---|
| 1202 | check-am: |
---|
| 1203 | $(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU |
---|
| 1204 | -check: check-recursive |
---|
| 1205 | +check: $(BUILT_SOURCES) |
---|
| 1206 | + $(MAKE) $(AM_MAKEFLAGS) check-recursive |
---|
| 1207 | all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) $(DATA) newlib.h |
---|
| 1208 | installdirs: installdirs-recursive |
---|
| 1209 | installdirs-am: |
---|
| 1210 | for dir in "$(DESTDIR)$(toollibdir)" "$(DESTDIR)$(toollibdir)" "$(DESTDIR)$(toollibdir)"; do \ |
---|
| 1211 | test -z "$$dir" || $(MKDIR_P) "$$dir"; \ |
---|
| 1212 | done |
---|
| 1213 | -install: install-recursive |
---|
| 1214 | +install: $(BUILT_SOURCES) |
---|
| 1215 | + $(MAKE) $(AM_MAKEFLAGS) install-recursive |
---|
| 1216 | install-exec: install-exec-recursive |
---|
| 1217 | install-data: install-data-recursive |
---|
| 1218 | uninstall: uninstall-recursive |
---|
| 1219 | @@ -758,6 +760,7 @@ |
---|
| 1220 | maintainer-clean-generic: |
---|
| 1221 | @echo "This command is intended for maintainers to use" |
---|
| 1222 | @echo "it deletes files that may require special tools to rebuild." |
---|
| 1223 | + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) |
---|
| 1224 | clean: clean-recursive |
---|
| 1225 | |
---|
| 1226 | clean-am: clean-generic clean-libtool clean-toollibLIBRARIES \ |
---|
| 1227 | @@ -833,8 +836,9 @@ |
---|
| 1228 | uninstall-am: uninstall-toollibDATA uninstall-toollibLIBRARIES \ |
---|
| 1229 | uninstall-toollibLTLIBRARIES |
---|
| 1230 | |
---|
| 1231 | -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check-am \ |
---|
| 1232 | - ctags-recursive install-am install-strip tags-recursive |
---|
| 1233 | +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \ |
---|
| 1234 | + check-am ctags-recursive install install-am install-strip \ |
---|
| 1235 | + tags-recursive |
---|
| 1236 | |
---|
| 1237 | .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ |
---|
| 1238 | all all-am am--refresh check check-DEJAGNU check-am clean \ |
---|