source:
rtems/contrib/crossrpms/patches/newlib-1.18.0-rtems4.10-20100825.diff
@
7c2d5b4
Last change on this file since 7c2d5b4 was 0d053015, checked in by Ralf Corsepius <ralf.corsepius@…>, on 08/28/10 at 06:09:15 | |
---|---|
|
|
File size: 46.8 KB |
-
newlib/ChangeLog.rtems
diff -Naur newlib-1.18.0.orig/newlib/ChangeLog.rtems newlib-1.18.0/newlib/ChangeLog.rtems
old new 1 2010-08-24 Sebastian Huber <sebastian.huber@embedded-brains.de> 2 3 * libc/posix/opendir.c: Added missing memory free. 4 5 2010-08-10 Ralf Corsépius <ralf.corsepius@rtems.org> 6 7 PR 1475/newlib: 8 * libc/include/stdint.h: Fall back to compute SIZE_MAX based on 9 __SIZEOF_SIZE_T__ and __CHAR_BIT__ if available. 10 11 2010-08-04 Ralf Corsépius <ralf.corsepius@rtems.org> 12 13 * libc/string/strcat.c: 14 Include <stdint.h>. Use uintptr_t instead of long in ALIGNED. 15 * libc/string/strchr.c, libc/string/strcmp.c, libc/string/strncmp.c: 16 Include <stdint.h>. Use uintptr_t instead of long in UNALIGNED. 17 * libc/include/sys/unistd.h: Activate decls for 18 getsid, setegid, seteuid. 19 20 2010-07-08 Ralf Corsépius <ralf.corsepius@rtems.org> 21 22 * configure.host: Add -D_COMPILING_NEWLIB to newlib_cflags. 23 * libc/string/index.c, libc/string/rindex.c: Include <string.h>. 24 * libc/stdlib/putenv_r.c: Include <strings.h> 25 26 2010-07-06 Corinna Vinschen <corinna@vinschen.de> 27 28 * libc/posix/rewinddir.c (rewinddir): Remove incorrect cast to off_t. 29 * libc/sys/rtems/sys/dirent.h (_seekdir): Add prototype. 30 31 2010-06-17 Ralf Corsépius <ralf.corsepius@rtems.org> 32 33 * libc/sys/rtems/machine/_types.h: Special case for sparc64. 34 35 2010-04-23 Ralf Corsépius <ralf.corsepius@rtems.org> 36 37 * libc/sys/rtems/machine/_types.h: Add _mode_t. 38 * libc/include/sys/types.h: Derive mode_t from _mode_t. 39 40 2010-04-02 Ralf Corsépius <ralf.corsepius@rtems.org> 41 42 * libc/include/sched.h, libc/include/sys/sched.h: 43 Adopt newlib-cvs's versions. 44 45 2010-03-25 Ralf Corsépius <ralf.corsepius@rtems.org> 46 47 * libc/include/strings.h: New (split-out from string.h). 48 * libc/include/string.h: Remove bcmp, bcopy, bzero, ffs, index, rindex, 49 strcasecmp, strncasecmp (Moved to strings.h). 50 Remove strcmpi, stricmp, strncmpi, strnicmp. 51 * libc/misc/ffs.c: Use <strings.h> instead of <string.h>. 52 * libc/string/bcmp.c: Use <strings.h> instead of <string.h>. 53 * libc/string/bzero.c: Use <strings.h> instead of <string.h>. 54 * libc/string/rindex.c: Use <strings.h> instead of <string.h>. 55 * libc/string/strcasecmp.c: Use <strings.h> instead of <string.h>. 56 * libc/string/strcasecmp.c: Use <strings.h> instead of <string.h>. 57 58 2010-03-23 Ralf Corsépius <ralf.corsepius@rtems.org> 59 60 * libc/sys/rtems/machine/_types.h: Add i386 to 64bit off_t targets. 61 62 2010-03-10 Ralf Corsépius <ralf.corsepius@rtems.org> 63 64 * libc/posix/telldir.c: Adopt newlib-cvs's telldir.c 65 66 2010-02-10 Ralf Corsépius <ralf.corsepius@rtems.org> 67 68 * libc/sys/rtems/machine/_types.h: Use __int64_t for _off_t, fpos_t for 69 selected targets. 70 71 2010-02-05 Ralf Corsépius <ralf.corsepius@rtems.org> 72 73 * libc/posix/telldir.c: Remove bogus nested prototype of lseek(). 74 75 2010-01-11 Sebastian Huber <sebastian.huber@embedded-brains.de> 76 77 * libc/posix/telldir.c (_cleanupdir): Fixed usage of freed memory. 78 79 2009-12-18 Ralf Corsépius <ralf.corsepius@rtems.org> 80 81 * libc/search/db_local.h: 82 Use __uint32_t instead of u_int (prototype mismatches). 83 * libc/search/extern.h (__buf_init): 84 Use __uint32_t instead of int (16 bit target portability). 85 * libc/search/hash_buf.c: Use ptrdiff_t instead of __uint32_t, 86 use __uint32_t instead of int (16 bit target portability). 87 * libc/search/hash.h: Use __uint32_it instead of int 88 (16 bit target portability). 89 * libm/common/modfl.c: Add cast to (double*) to avoid GCC warning. 90 * libm/common/sf_llrint.c, libm/common/sf_round.c: Add explicit 91 casts to __uint32_t to avoid overflows on implicit casts. 92 93 2009-12-18 Ralf Corsépius <ralf.corsepius@rtems.org> 94 95 Merger with newlib-1.18.0. 96 97 2009-10-29 Ralf Corsépius <ralf.corsepius@rtems.org> 98 99 * libc/sys/rtems/machine/_types.h: Rework. 100 * libc/sys/rtems/machine/stdint.h: Remove. 101 * libc/include/inttypes.h: 102 Rework logic to determine PRI*PTR. 103 Prefer long64 over longlong64. 104 * libc/include/machine/_default_types.h: 105 Sync logic for __int32 with stdint.h (Prefer long over int). 106 * libc/include/stdint.h: 107 Remove __SPU__ hack. 108 Prefer int for int16_t (sync with _default_types.h). 109 Rework intptr_t determination. 110 111 2009-10-28 Ralf Corsépius <ralf.corsepius@rtems.org> 112 113 * libc/sys/rtems/machine/_types.h: New. 114 Add custom time for _ssize_t. 115 * libc/stdlib/assert.c: Sync with newlib-CVS. 116 * configure.host: Add -DHAVE_ASSERT_FUNC to newlib_cflags. 117 118 2009-10-27 Ralf Corsépius <ralf.corsepius@rtems.org> 119 120 * libc/include/sys/pthread.h: 121 Add pthread_atfork (Mandated by IEEE Std 1003.1-2008). 122 Add pthread_rwlock_unlock (Formerly missing) 123 124 2009-10-26 Ralf Corsépius <ralf.corsepius@rtems.org> 125 126 * libc/include/sys/signal.h: Sync with newlib-CVS. 127 128 2009-10-09 Ralf Corsépius <ralf.corsepius@rtems.org> 129 130 * libc/include/sys/signal.h: Use pid_t as 1st arg to kill() 131 (mandated by POSIX). 132 133 2009-09-22 Ralf Corsépius <ralf.corsepius@rtems.org> 134 135 * libc/sys/rtems/sys/queue.h: Update copyright (from FreeBSD). 136 Remove CIRCLEQ_*. 137 * libc/search/hcreate.c: Don't include sys/queue.h. 138 139 2009-09-18 Christopher Faylor <me+cygwin@cgf.cx> 140 141 * libc/include/sys/unistd.h: Declare getpagesize as returning 142 POSIX-mandated int. 143 144 2009-09-16 Ralf Corsépius <ralf.corsepius@rtems.org> 145 146 * libc/sys/rtems/crt0.c: Use while(1) in _exit stub to silence GCC "noreturn" 147 warning. 148 149 2009-09-15 Ralf Corsépius <ralf.corsepius@rtems.org> 150 151 * libc/include/stdlib.h: Add posix_memalign. 152 153 2009-09-11 Ralf Corsépius <ralf.corsepius@rtems.org> 154 155 * configure.host (m32c): Remove -D_ABORT_PROVIDED. 156 157 2009-09-10 Ralf Corsépius <ralf.corsepius@rtems.org> 158 159 * configure.host: Add -D_NO_POPEN. 160 * libc/sys/rtems/crt0.c: Don't provide waitpid unless used. 161 162 2009-09-09 Ralf Corsépius <ralf.corsepius@rtems.org> 163 164 * configure.host: Add -D_NO_WORDEXP. 165 166 2009-09-06 Ralf Corsépius <ralf.corsepius@rtems.org> 167 168 * libc/sys/rtems/crt0.c: Add issetugid. 169 170 2009-09-02 Ralf Corsépius <ralf.corsepius@rtems.org> 171 172 * libc/sys/rtems/crt0.c: Rework. Introduce macro RTEMS_STUB. 173 174 2009-07-27 Ralf Corsépius <ralf.corsepius@rtems.org> 175 176 * libc/sys/rtems/crt0.c: Add _isatty_r. 177 178 2009-07-06 Joel Sherrill <joel.sherrill@oarcorp.com> 179 180 * libc/include/sys/features.h: Define _UNIX98_THREAD_MUTEX_ATTRIBUTES. 181 182 2009-05-05 Ralf Corsépius <ralf.corsepius@rtems.org> 183 184 * configure.host: Remove -DMISSING_SYSCALL_NAMES. 185 186 2009-03-11 Ralf Corsépius <ralf.corsepius@rtems.org> 187 188 * libc/stdlib/assert.c: Don't build __assert_func. 189 * libc/sys/rtems/crt0.c: Add __assert_func. 190 191 2009-03-09 Ralf Corsépius <ralf.corsepius@rtems.org> 192 193 * libc/machine/powerpc/times.c: Remove. 194 * libc/machine/powerpc/Makefile.am: Remove times.c. 195 * libc/machine/powerpc/Makefile.in: Regenerate. 196 197 2009-02-24 Ralf Corsépius <ralf.corsepius@rtems.org> 198 199 * libc/unix/ttyname.c: Sync with newlib-cvs. 200 * configure.host: Add -DHAVE_BLKSIZE to newlib_cflags. 201 202 2009-02-22 Ralf Corsépius <ralf.corsepius@rtems.org> 203 204 * libc/sys/rtems/machine/stdint.h: Add __lm32__. 205 * libc/machine/lm32/configure.in: Set AC_CONFIG_SRC to setjmp.S. 206 * libc/machine/lm32/configure: Regenerate. 207 208 2009-02-20 Ralf Corsépius <ralf.corsepius@rtems.org> 209 210 * libc/unix/Makefile.in: Regenerate. 211 212 2009-02-20 Craig Howland <howland@LGSInnovations.com> on behalf of 213 Sebastian Huber <sebastian.huber@embedded-brains.de> 214 215 * libc/unix/ttyname.c: Remove ttyname_r() (to a new file to avoid 216 coupling ttyname_r() and ttyname() due to the latter's large buffer). 217 * libc/unix/ttyname_r.c: New file to hold ttyname_r(), previously in 218 ttyname.c. 219 * libc/unix/ttyname.h: New file (common size definition for the 2 220 ttyname*c files that are now split). 221 * libc/unix/Makefile.am (ELIX_2_SOURCES): Add ttyname_r.c. 222 223 2009-02-16 Ralf Corsépius <ralf.corsepius@rtems.org> 224 225 * libc/sys/rtems/sys/param.h: 226 Update copyright notice from FreeBSD. 227 Remove HZ. 228 Add #include <sys/priority.h> 229 Remove priority handling (moved to sys/priority.h). 230 Remove CLBYTES (Unused, abandoned in BSD). 231 232 2009-02-06 Ralf Corsépius <ralf.corsepius@rtems.org> 233 234 * libc/include/sched.h: 235 Remove (collides with RTEMS's schedul.h). 236 -
newlib/configure.host
diff -Naur newlib-1.18.0.orig/newlib/configure.host newlib-1.18.0/newlib/configure.host
old new 556 556 *-*-rtems*) 557 557 default_newlib_io_long_long="yes" 558 558 default_newlib_io_c99_formats="yes" 559 newlib_cflags="${newlib_cflags} -D_COMPILING_NEWLIB" 559 560 newlib_cflags="${newlib_cflags} -DMALLOC_PROVIDED -DEXIT_PROVIDED -DSIGNAL_PROVIDED -DREENTRANT_SYSCALLS_PROVIDED -DHAVE_NANOSLEEP -DHAVE_BLKSIZE -DHAVE_FCNTL -DHAVE_ASSERT_FUNC" 560 561 # turn off unsupported items in posix directory 561 562 newlib_cflags="${newlib_cflags} -D_NO_GETLOGIN -D_NO_GETPWENT -D_NO_GETUT -D_NO_GETPASS -D_NO_SIGSET -D_NO_WORDEXP -D_NO_POPEN" -
newlib/libc/include/inttypes.h
diff -Naur newlib-1.18.0.orig/newlib/libc/include/inttypes.h newlib-1.18.0/newlib/libc/include/inttypes.h
old new 242 242 #define SCNxMAX __SCNMAX(x) 243 243 244 244 /* ptr types */ 245 #if INTPTR_MAX == INT64_MAX 246 #define __PRIPTR(x) __PRI64(x) 247 #define __SCNPTR(x) __SCN64(x) 248 #elif INTPTR_MAX == INT32_MAX 249 #define __PRIPTR(x) __PRI32(x) 250 #define __SCNPTR(x) __SCN32(x) 251 #elif INTPTR_MAX == INT16_MAX 252 #define __PRIPTR(x) __PRI16(x) 253 #define __SCNPTR(x) __SCN16(x) 254 #else 255 #error cannot determine PRI*PTR 256 #endif 257 258 #if 0 245 259 #if __have_long64 246 260 #define __PRIPTR(x) __STRINGIFY(l##x) 247 261 #define __SCNPTR(x) __STRINGIFY(l##x) … … 252 266 #define __PRIPTR(x) __STRINGIFY(x) 253 267 #define __SCNPTR(x) __STRINGIFY(x) 254 268 #endif 269 #endif 255 270 256 271 #define PRIdPTR __PRIPTR(d) 257 272 #define PRIiPTR __PRIPTR(i) -
newlib/libc/include/machine/_default_types.h
diff -Naur newlib-1.18.0.orig/newlib/libc/include/machine/_default_types.h newlib-1.18.0/newlib/libc/include/machine/_default_types.h
old new 54 54 #endif 55 55 #endif 56 56 57 #if __EXP(INT_MAX) == 0x7fffffffL 58 typedef signed int __int32_t; 59 typedef unsigned int __uint32_t; 60 #define ___int32_t_defined 1 61 #elif __EXP(LONG_MAX) == 0x7fffffffL 57 #if __EXP(LONG_MAX) == 0x7fffffffL 62 58 typedef signed long __int32_t; 63 59 typedef unsigned long __uint32_t; 64 60 #define ___int32_t_defined 1 61 #elif __EXP(INT_MAX) == 0x7fffffffL 62 typedef signed int __int32_t; 63 typedef unsigned int __uint32_t; 64 #define ___int32_t_defined 1 65 65 #elif __EXP(SHRT_MAX) == 0x7fffffffL 66 66 typedef signed short __int32_t; 67 67 typedef unsigned short __uint32_t; -
newlib/libc/include/sched.h
diff -Naur newlib-1.18.0.orig/newlib/libc/include/sched.h newlib-1.18.0/newlib/libc/include/sched.h
old new 1 /* 2 * Written by Joel Sherrill <joel@OARcorp.com>. 3 * 4 * COPYRIGHT (c) 1989-2010. 5 * On-Line Applications Research Corporation (OAR). 6 * 7 * Permission to use, copy, modify, and distribute this software for any 8 * purpose without fee is hereby granted, provided that this entire notice 9 * is included in all copies of any software which is or includes a copy 10 * or modification of this software. 11 * 12 * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED 13 * WARRANTY. IN PARTICULAR, THE AUTHOR MAKES NO REPRESENTATION 14 * OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY OF THIS 15 * SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE. 16 * 17 * $Id$ 18 */ 19 1 20 #ifndef _SCHED_H_ 2 21 #define _SCHED_H_ 3 22 23 #include <sys/types.h> 24 #include <sys/sched.h> 25 4 26 #ifdef __cplusplus 5 27 extern "C" { 6 28 #endif 7 29 8 #include <sys/sched.h> 30 #if defined(_POSIX_PRIORITY_SCHEDULING) 31 /* 32 * XBD 13 - Set Scheduling Parameters, P1003.1b-2008, p. 1803 33 */ 34 int sched_setparam( 35 pid_t __pid, 36 const struct sched_param *__param 37 ); 38 39 /* 40 * XBD 13 - Set Scheduling Parameters, P1003.1b-2008, p. 1800 41 */ 42 int sched_getparam( 43 pid_t __pid, 44 struct sched_param *__param 45 ); 46 47 /* 48 * XBD 13 - Set Scheduling Policy and Scheduling Parameters, 49 * P1003.1b-2008, p. 1805 50 */ 51 int sched_setscheduler( 52 pid_t __pid, 53 int __policy, 54 const struct sched_param *__param 55 ); 56 57 /* 58 * XBD 13 - Get Scheduling Policy, P1003.1b-2008, p. 1801 59 */ 60 int sched_getscheduler( 61 pid_t __pid 62 ); 63 64 /* 65 * XBD 13 - Get Scheduling Parameter Limits, P1003.1b-2008, p. 1799 66 */ 67 int sched_get_priority_max( 68 int __policy 69 ); 70 71 int sched_get_priority_min( 72 int __policy 73 ); 74 75 /* 76 * XBD 13 - Get Scheduling Parameter Limits, P1003.1b-2008, p. 1802 77 */ 78 int sched_rr_get_interval( 79 pid_t __pid, 80 struct timespec *__interval 81 ); 82 #endif /* _POSIX_PRIORITY_SCHEDULING */ 83 84 #if defined(_POSIX_THREADS) || defined(_POSIX_PRIORITY_SCHEDULING) 85 86 /* 87 * XBD 13 - Yield Processor, P1003.1b-2008, p. 1807 88 */ 89 int sched_yield( void ); 90 91 #endif /* _POSIX_THREADS or _POSIX_PRIORITY_SCHEDULING */ 9 92 10 93 #ifdef __cplusplus 11 94 } -
newlib/libc/include/stdint.h
diff -Naur newlib-1.18.0.orig/newlib/libc/include/stdint.h newlib-1.18.0/newlib/libc/include/stdint.h
old new 33 33 /* Check if "long" is 64bit or 32bit wide */ 34 34 #if __STDINT_EXP(LONG_MAX) > 0x7fffffff 35 35 #define __have_long64 1 36 #elif __STDINT_EXP(LONG_MAX) == 0x7fffffff && !defined(__SPU__)36 #elif __STDINT_EXP(LONG_MAX) == 0x7fffffff 37 37 #define __have_long32 1 38 38 #endif 39 39 … … 49 49 #define __int_least8_t_defined 1 50 50 #endif 51 51 52 #if __STDINT_EXP(SHRT_MAX) == 0x7fff 53 typedef signed short int16_t; 54 typedef unsigned short uint16_t; 55 #define __int16_t_defined 1 56 #elif __STDINT_EXP(INT_MAX) == 0x7fff 52 #if __STDINT_EXP(INT_MAX) == 0x7fff 57 53 typedef signed int int16_t; 58 54 typedef unsigned int uint16_t; 59 55 #define __int16_t_defined 1 56 #elif __STDINT_EXP(SHRT_MAX) == 0x7fff 57 typedef signed short int16_t; 58 typedef unsigned short uint16_t; 59 #define __int16_t_defined 1 60 60 #elif __STDINT_EXP(SCHAR_MAX) == 0x7fff 61 61 typedef signed char int16_t; 62 62 typedef unsigned char uint16_t; … … 239 239 * GCC doesn't provide an appropriate macro for [u]intptr_t 240 240 * For now, use __PTRDIFF_TYPE__ 241 241 */ 242 #if defined(__SIZEOF_POINTER__) 243 #if __SIZEOF_POINTER__ == 8 244 typedef int64_t intptr_t; 245 typedef uint64_t uintptr_t; 246 #define INTPTR_MAX INT64_MAX 247 #define INTPTR_MIN INT64_MIN 248 #define UINTPTR_MAX UINT64_MAX 249 #elif __SIZEOF_POINTER__ == 4 250 typedef int32_t intptr_t; 251 typedef uint32_t uintptr_t; 252 #define INTPTR_MAX INT32_MAX 253 #define INTPTR_MIN INT32_MIN 254 #define UINTPTR_MAX UINT32_MAX 255 #elif __SIZEOF_POINTER__ == 2 256 typedef int16_t intptr_t; 257 typedef uint16_t uintptr_t; 258 #define INTPTR_MAX INT16_MAX 259 #define INTPTR_MIN INT16_MIN 260 #define UINTPTR_MAX UINT16_MAX 261 #else 262 #error cannot determine intptr_t 263 #endif 264 #else 242 265 #if defined(__PTRDIFF_TYPE__) 243 266 typedef signed __PTRDIFF_TYPE__ intptr_t; 244 267 typedef unsigned __PTRDIFF_TYPE__ uintptr_t; … … 260 283 #define INTPTR_MIN (-__STDINT_EXP(LONG_MAX) - 1) 261 284 #define UINTPTR_MAX (__STDINT_EXP(LONG_MAX) * 2UL + 1) 262 285 #endif 286 #endif 263 287 264 288 /* Limits of Specified-Width Integer Types */ 265 289 … … 408 432 /* This must match size_t in stddef.h, currently long unsigned int */ 409 433 #ifdef __SIZE_MAX__ 410 434 #define SIZE_MAX __SIZE_MAX__ 435 #elif defined(__SIZEOF_SIZE_T__) && defined(__CHAR_BIT__) 436 #define SIZE_MAX (__SIZEOF_SIZE_T__ * __CHAR_BIT__) 411 437 #else 412 438 #define SIZE_MAX (__STDINT_EXP(LONG_MAX) * 2UL + 1) 413 439 #endif -
newlib/libc/include/string.h
diff -Naur newlib-1.18.0.orig/newlib/libc/include/string.h newlib-1.18.0/newlib/libc/include/string.h
old new 49 49 #ifndef __STRICT_ANSI__ 50 50 char *_EXFUN(strtok_r,(char *, const char *, char **)); 51 51 52 int _EXFUN(bcmp,(const void *, const void *, size_t));53 void _EXFUN(bcopy,(const void *, void *, size_t));54 void _EXFUN(bzero,(void *, size_t));55 int _EXFUN(ffs,(int));56 char *_EXFUN(index,(const char *, int));57 52 _PTR _EXFUN(memccpy,(_PTR, const _PTR, int, size_t)); 58 53 _PTR _EXFUN(mempcpy,(_PTR, const _PTR, size_t)); 59 54 _PTR _EXFUN(memmem, (const _PTR, size_t, const _PTR, size_t)); 60 char *_EXFUN(rindex,(const char *, int));61 55 char *_EXFUN(stpcpy,(char *, const char *)); 62 56 char *_EXFUN(stpncpy,(char *, const char *, size_t)); 63 int _EXFUN(strcasecmp,(const char *, const char *));64 57 char *_EXFUN(strcasestr,(const char *, const char *)); 65 58 char *_EXFUN(strdup,(const char *)); 66 59 char *_EXFUN(_strdup_r,(struct _reent *, const char *)); … … 69 62 char *_EXFUN(strerror_r,(int, char *, size_t)); 70 63 size_t _EXFUN(strlcat,(char *, const char *, size_t)); 71 64 size_t _EXFUN(strlcpy,(char *, const char *, size_t)); 72 int _EXFUN(strncasecmp,(const char *, const char *, size_t));73 65 size_t _EXFUN(strnlen,(const char *, size_t)); 74 66 char *_EXFUN(strsep,(char **, const char *)); 75 67 char *_EXFUN(strlwr,(char *)); … … 81 73 int _EXFUN(strtosigno, (const char *__name)); 82 74 #endif 83 75 84 /* These function names are used on Windows and perhaps other systems. */85 #ifndef strcmpi86 #define strcmpi strcasecmp87 #endif88 #ifndef stricmp89 #define stricmp strcasecmp90 #endif91 #ifndef strncmpi92 #define strncmpi strncasecmp93 #endif94 #ifndef strnicmp95 #define strnicmp strncasecmp96 #endif97 98 76 #endif /* ! __STRICT_ANSI__ */ 99 77 100 78 #include <sys/string.h> -
newlib/libc/include/strings.h
diff -Naur newlib-1.18.0.orig/newlib/libc/include/strings.h newlib-1.18.0/newlib/libc/include/strings.h
old new 1 /* 2 * strings.h 3 * 4 * Definitions for string operations. 5 */ 6 7 #ifndef _STRINGS_H_ 8 #define _STRINGS_H_ 9 10 #include "_ansi.h" 11 #include <sys/reent.h> 12 13 #include <sys/types.h> /* for size_t */ 14 #include <locale.h> /* for locale_t */ 15 16 _BEGIN_STD_C 17 18 #ifndef __STRICT_ANSI__ 19 /* 20 * Marked LEGACY in Open Group Base Specifications Issue 6/IEEE Std 1003.1-2004 21 * Removed from Open Group Base Specifications Issue 7/IEEE Std 1003.1-2008 22 */ 23 int _EXFUN(bcmp,(const void *, const void *, size_t)); 24 void _EXFUN(bcopy,(const void *, void *, size_t)); 25 void _EXFUN(bzero,(void *, size_t)); 26 char *_EXFUN(index,(const char *, int)); 27 char *_EXFUN(rindex,(const char *, int)); 28 #endif /* ! __STRICT_ANSI__ */ 29 30 int _EXFUN(ffs,(int)); 31 int _EXFUN(strcasecmp,(const char *, const char *)); 32 #if 0 33 /* Not implemented */ 34 int _EXFUN(strcasecmp_l,(const char *, const char *, locale_t)); 35 #endif 36 int _EXFUN(strncasecmp,(const char *, const char *, size_t)); 37 #if 0 38 /* Not implemented */ 39 int _EXFUN(strncasecmp_l,(const char *, const char *, size_t, locale_t)); 40 #endif 41 42 _END_STD_C 43 44 #endif /* _STRINGS_H_ */ -
newlib/libc/include/sys/features.h
diff -Naur newlib-1.18.0.orig/newlib/libc/include/sys/features.h newlib-1.18.0/newlib/libc/include/sys/features.h
old new 33 33 #define _POSIX_VERSION 199309L 34 34 #define _POSIX_ASYNCHRONOUS_IO 1 35 35 #define _POSIX_FSYNC 1 36 #define _POSIX_MAPPED_FILES 1 36 /* #define _POSIX_MAPPED_FILES 1 */ 37 37 #define _POSIX_MEMLOCK 1 38 38 #define _POSIX_MEMLOCK_RANGE 1 39 39 #define _POSIX_MEMORY_PROTECTION 1 -
newlib/libc/include/sys/sched.h
diff -Naur newlib-1.18.0.orig/newlib/libc/include/sys/sched.h newlib-1.18.0/newlib/libc/include/sys/sched.h
old new 1 1 /* 2 2 * Written by Joel Sherrill <joel@OARcorp.com>. 3 3 * 4 * COPYRIGHT (c) 1989-20 00.4 * COPYRIGHT (c) 1989-2010. 5 5 * On-Line Applications Research Corporation (OAR). 6 6 * 7 7 * Permission to use, copy, modify, and distribute this software for any … … 14 14 * OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY OF THIS 15 15 * SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE. 16 16 * 17 * $Id$ 17 * $Id$ 18 18 */ 19 19 20 20 21 #ifndef _ _POSIX_SYS_SCHEDULING_h22 #define _ _POSIX_SYS_SCHEDULING_h21 #ifndef _SYS_SCHED_H_ 22 #define _SYS_SCHED_H_ 23 23 24 24 #ifdef __cplusplus 25 25 extern "C" { 26 26 #endif 27 27 28 #include <sys/unistd.h> 29 30 #include <sys/types.h> 31 #include <sys/time.h> 32 33 /* Scheduling Policies, P1003.1b-1993, p. 250 34 NOTE: SCHED_SPORADIC added by P1003.4b/D8, p. 34. */ 35 28 /* Scheduling Policies */ 29 /* Open Group Specifications Issue 6 */ 30 #if defined(__CYGWIN__) 31 #define SCHED_OTHER 3 32 #else 36 33 #define SCHED_OTHER 0 34 #endif 35 37 36 #define SCHED_FIFO 1 38 37 #define SCHED_RR 2 39 38 40 39 #if defined(_POSIX_SPORADIC_SERVER) 41 #define SCHED_SPORADIC 340 #define SCHED_SPORADIC 4 42 41 #endif 43 42 44 /* Scheduling Parameters , P1003.1b-1993, p. 24945 NOTE: Fields whose name begins with "ss_" added by P1003.4b/D8, p. 33.*/43 /* Scheduling Parameters */ 44 /* Open Group Specifications Issue 6 */ 46 45 47 46 struct sched_param { 48 47 int sched_priority; /* Process execution scheduling priority */ 49 48 50 #if defined(_POSIX_SPORADIC_SERVER) 51 int s s_low_priority;/* Low scheduling priority for sporadic */49 #if defined(_POSIX_SPORADIC_SERVER) || defined(_POSIX_THREAD_SPORADIC_SERVER) 50 int sched_ss_low_priority; /* Low scheduling priority for sporadic */ 52 51 /* server */ 53 struct timespec s s_replenish_period;52 struct timespec sched_ss_repl_period; 54 53 /* Replenishment period for sporadic server */ 55 struct timespec ss_initial_budget; /* Initial budget for sporadic server */ 54 struct timespec sched_ss_init_budget; 55 /* Initial budget for sporadic server */ 56 int sched_ss_max_repl; /* Maximum pending replenishments for */ 57 /* sporadic server */ 56 58 #endif 57 59 }; 58 60 59 61 #ifdef __cplusplus 60 62 } 61 #endif 63 #endif 62 64 63 65 #endif 64 66 /* end of include file */ -
newlib/libc/include/sys/types.h
diff -Naur newlib-1.18.0.orig/newlib/libc/include/sys/types.h newlib-1.18.0/newlib/libc/include/sys/types.h
old new 176 176 #endif 177 177 typedef _ssize_t ssize_t; 178 178 179 #ifndef __CYGWIN__ 179 #if defined(__rtems__) 180 typedef _mode_t mode_t; 181 #endif 182 183 #if !defined(__CYGWIN__) && !defined(__rtems__) 180 184 #ifdef __MS_types__ 181 185 typedef char * addr_t; 182 186 typedef int mode_t; -
newlib/libc/machine/powerpc/Makefile.am
diff -Naur newlib-1.18.0.orig/newlib/libc/machine/powerpc/Makefile.am newlib-1.18.0/newlib/libc/machine/powerpc/Makefile.am
old new 10 10 11 11 AM_CFLAGS = -I $(srcdir)/../../stdio -I $(srcdir)/../../stdlib 12 12 13 lib_a_SOURCES = setjmp.S times.c13 lib_a_SOURCES = setjmp.S 14 14 lib_a_CCASFLAGS=$(AM_CCASFLAGS) 15 15 lib_a_CFLAGS=$(AM_CFLAGS) 16 16 lib_a_LIBADD = @extra_objs@ -
newlib/libc/machine/powerpc/Makefile.in
diff -Naur newlib-1.18.0.orig/newlib/libc/machine/powerpc/Makefile.in newlib-1.18.0/newlib/libc/machine/powerpc/Makefile.in
old new 51 51 LIBRARIES = $(noinst_LIBRARIES) 52 52 ARFLAGS = cru 53 53 lib_a_AR = $(AR) $(ARFLAGS) 54 am_lib_a_OBJECTS = lib_a-setjmp.$(OBJEXT) lib_a-times.$(OBJEXT)54 am_lib_a_OBJECTS = lib_a-setjmp.$(OBJEXT) 55 55 lib_a_OBJECTS = $(am_lib_a_OBJECTS) 56 56 DEFAULT_INCLUDES = -I.@am__isrc@ 57 57 depcomp = … … 173 173 AM_CCASFLAGS = $(INCLUDES) 174 174 noinst_LIBRARIES = lib.a 175 175 AM_CFLAGS = -I $(srcdir)/../../stdio -I $(srcdir)/../../stdlib 176 lib_a_SOURCES = setjmp.S times.c176 lib_a_SOURCES = setjmp.S 177 177 lib_a_CCASFLAGS = $(AM_CCASFLAGS) 178 178 lib_a_CFLAGS = $(AM_CFLAGS) 179 179 lib_a_LIBADD = @extra_objs@ … … 184 184 all: all-am 185 185 186 186 .SUFFIXES: 187 .SUFFIXES: .S . c .o .obj187 .SUFFIXES: .S .o .obj 188 188 am--refresh: 189 189 @: 190 190 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) … … 245 245 lib_a-setjmp.obj: setjmp.S 246 246 $(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` 247 247 248 .c.o:249 $(COMPILE) -c $<250 251 .c.obj:252 $(COMPILE) -c `$(CYGPATH_W) '$<'`253 254 lib_a-times.o: times.c255 $(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.c256 257 lib_a-times.obj: times.c258 $(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`259 260 248 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) 261 249 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ 262 250 unique=`for i in $$list; do \ -
newlib/libc/machine/powerpc/times.c
diff -Naur newlib-1.18.0.orig/newlib/libc/machine/powerpc/times.c newlib-1.18.0/newlib/libc/machine/powerpc/times.c
old new 1 /* Time support routines for PowerPC.2 *3 * Written by Aldy Hernandez.4 */5 6 #include <_ansi.h>7 #include <reent.h>8 #include <sys/time.h>9 #include <sys/times.h>10 #include <sys/resource.h>11 12 clock_t13 times (struct tms *tp)14 {15 struct rusage usage;16 union {17 struct rusage r;18 /* Newlib's rusage has only 2 fields. We need to make room for19 when we call the system's rusage. This should be enough. */20 int filler[32];21 } host_ru;22 23 getrusage (RUSAGE_SELF, (void *)&host_ru);24 25 if (tp)26 {27 tp->tms_utime = host_ru.r.ru_utime.tv_sec * 100028 + host_ru.r.ru_utime.tv_usec;29 tp->tms_stime = host_ru.r.ru_stime.tv_sec * 100030 + host_ru.r.ru_stime.tv_usec;31 tp->tms_cutime = 0; /* user time, children */32 tp->tms_cstime = 0; /* system time, children */33 }34 35 return tp->tms_utime;36 } -
newlib/libc/misc/ffs.c
diff -Naur newlib-1.18.0.orig/newlib/libc/misc/ffs.c newlib-1.18.0/newlib/libc/misc/ffs.c
old new 24 24 25 25 No supporting OS subroutines are required. */ 26 26 27 #include < _ansi.h>27 #include <strings.h> 28 28 29 29 int 30 30 _DEFUN(ffs, (word), -
newlib/libc/posix/opendir.c
diff -Naur newlib-1.18.0.orig/newlib/libc/posix/opendir.c newlib-1.18.0/newlib/libc/posix/opendir.c
old new 74 74 dirp->dd_len = 512; 75 75 76 76 if (dirp->dd_buf == NULL) { 77 free(dirp); 77 78 close (fd); 78 79 return NULL; 79 80 } -
newlib/libc/posix/rewinddir.c
diff -Naur newlib-1.18.0.orig/newlib/libc/posix/rewinddir.c newlib-1.18.0/newlib/libc/posix/rewinddir.c
old new 48 48 #ifdef HAVE_DD_LOCK 49 49 __lock_acquire_recursive(dirp->dd_lock); 50 50 #endif 51 _seekdir((dirp), (off_t)0);51 _seekdir((dirp), 0L); 52 52 #ifdef HAVE_DD_LOCK 53 53 __lock_release_recursive(dirp->dd_lock); 54 54 #endif -
newlib/libc/posix/telldir.c
diff -Naur newlib-1.18.0.orig/newlib/libc/posix/telldir.c newlib-1.18.0/newlib/libc/posix/telldir.c
old new 67 67 #define NDIRHASH 32 /* Num of hash lists, must be a power of 2 */ 68 68 #define LOCHASH(i) ((i)&(NDIRHASH-1)) 69 69 70 static long dd_loccnt ; /* Index of entry for sequential readdir's */70 static long dd_loccnt = 1; /* Index of entry for sequential readdir's */ 71 71 static struct ddloc *dd_hash[NDIRHASH]; /* Hash list heads for ddlocs */ 72 72 __LOCK_INIT(static, dd_hash_lock); 73 73 … … 119 119 register struct ddloc *lp; 120 120 register struct ddloc **prevlp; 121 121 struct dirent *dp; 122 extern long lseek();123 122 124 123 #ifdef HAVE_DD_LOCK 125 124 __lock_acquire(dd_hash_lock); 126 125 #endif 127 prevlp = &dd_hash[LOCHASH(loc)]; 128 lp = *prevlp; 129 while (lp != NULL) { 130 if (lp->loc_index == loc) 131 break; 132 prevlp = &lp->loc_next; 133 lp = lp->loc_next; 134 } 135 if (lp == NULL) { 126 if (loc != 0) { 127 prevlp = &dd_hash[LOCHASH(loc)]; 128 lp = *prevlp; 129 while (lp != NULL) { 130 if (lp->loc_index == loc) 131 break; 132 prevlp = &lp->loc_next; 133 lp = lp->loc_next; 134 } 135 if (lp == NULL) { 136 136 #ifdef HAVE_DD_LOCK 137 __lock_release(dd_hash_lock);137 __lock_release(dd_hash_lock); 138 138 #endif 139 return;140 }141 if (lp->loc_loc == dirp->dd_loc && lp->loc_seek == dirp->dd_seek)142 goto found;143 (void) lseek(dirp->dd_fd, lp->loc_seek, 0);144 dirp->dd_seek = lp->loc_seek;145 dirp->dd_loc = 0;146 while (dirp->dd_loc < lp->loc_loc) {147 dp = readdir(dirp);148 if (dp == NULL)149 break;150 }139 return; 140 } 141 if (lp->loc_loc == dirp->dd_loc && lp->loc_seek == dirp->dd_seek) 142 goto found; 143 (void) lseek(dirp->dd_fd, lp->loc_seek, 0); 144 dirp->dd_seek = lp->loc_seek; 145 dirp->dd_loc = 0; 146 while (dirp->dd_loc < lp->loc_loc) { 147 dp = readdir(dirp); 148 if (dp == NULL) 149 break; 150 } 151 151 found: 152 152 #ifdef SINGLEUSE 153 *prevlp = lp->loc_next;154 free((caddr_t)lp);153 *prevlp = lp->loc_next; 154 free((caddr_t)lp); 155 155 #endif 156 } else { 157 // loc 0 means rewinding 158 (void) lseek(dirp->dd_fd, 0, 0); 159 dirp->dd_seek = 0; 160 dirp->dd_loc = 0; 161 } 156 162 #ifdef HAVE_DD_LOCK 157 163 __lock_release(dd_hash_lock); 158 164 #endif … … 169 175 __lock_acquire(dd_hash_lock); 170 176 #endif 171 177 for (i = 0; i < NDIRHASH; ++i) { 178 struct ddloc head; 172 179 register struct ddloc *lp; 173 180 register struct ddloc *prevlp; 181 174 182 lp = dd_hash[i]; 175 while (lp != NULL && lp->loc_dirp == dirp) { 176 dd_hash[i] = lp->loc_next; 177 prevlp = lp; 178 free((caddr_t)lp); 179 lp = prevlp->loc_next; 180 } 181 prevlp = lp; 183 head.loc_next = lp; 184 prevlp = &head; 182 185 while (lp != NULL) { 183 lp = lp->loc_next; 184 if (lp != NULL && lp->loc_dirp == dirp) { 185 prevlp->loc_next = lp->loc_next; 186 struct ddloc *nextlp; 187 188 nextlp = lp->loc_next; 189 if (lp->loc_dirp == dirp) { 190 prevlp->loc_next = nextlp; 186 191 free((caddr_t)lp); 187 lp = prevlp;188 192 } 189 193 else 190 194 prevlp = lp; 195 lp = nextlp; 191 196 } 197 dd_hash[i] = head.loc_next; 192 198 } 193 199 #ifdef HAVE_DD_LOCK 194 200 __lock_release(dd_hash_lock); -
newlib/libc/search/db_local.h
diff -Naur newlib-1.18.0.orig/newlib/libc/search/db_local.h newlib-1.18.0/newlib/libc/search/db_local.h
old new 102 102 typedef struct __db { 103 103 DBTYPE type; /* Underlying db type. */ 104 104 int (*close)(struct __db *); 105 int (*del)(const struct __db *, const DBT *, u_int);106 int (*get)(const struct __db *, const DBT *, DBT *, u_int);107 int (*put)(const struct __db *, DBT *, const DBT *, u_int);108 int (*seq)(const struct __db *, DBT *, DBT *, u_int);109 int (*sync)(const struct __db *, u_int);105 int (*del)(const struct __db *, const DBT *, __uint32_t); 106 int (*get)(const struct __db *, const DBT *, DBT *, __uint32_t); 107 int (*put)(const struct __db *, DBT *, const DBT *, __uint32_t); 108 int (*seq)(const struct __db *, DBT *, DBT *, __uint32_t); 109 int (*sync)(const struct __db *, __uint32_t); 110 110 void *internal; /* Access method private. */ 111 111 int (*fd)(const struct __db *); 112 112 } DB; -
newlib/libc/search/extern.h
diff -Naur newlib-1.18.0.orig/newlib/libc/search/extern.h newlib-1.18.0/newlib/libc/search/extern.h
old new 43 43 int __big_split(HTAB *, BUFHEAD *, BUFHEAD *, BUFHEAD *, 44 44 int, __uint32_t, SPLIT_RETURN *); 45 45 int __buf_free(HTAB *, int, int); 46 void __buf_init(HTAB *, int);46 void __buf_init(HTAB *, __uint32_t); 47 47 __uint32_t __call_hash(HTAB *, char *, int); 48 48 int __delpair(HTAB *, BUFHEAD *, int); 49 49 int __expand_table(HTAB *); -
newlib/libc/search/hash_buf.c
diff -Naur newlib-1.18.0.orig/newlib/libc/search/hash_buf.c newlib-1.18.0/newlib/libc/search/hash_buf.c
old new 118 118 int newpage; /* If prev_bp set, indicates a new overflow page. */ 119 119 { 120 120 BUFHEAD *bp; 121 __uint32_t is_disk_mask;121 ptrdiff_t is_disk_mask; 122 122 int is_disk, segment_ndx; 123 123 SEGMENT segp; 124 124 … … 298 298 extern void 299 299 __buf_init(hashp, nbytes) 300 300 HTAB *hashp; 301 int nbytes;301 __uint32_t nbytes; 302 302 { 303 303 BUFHEAD *bfp; 304 304 int npages; -
newlib/libc/search/hash.h
diff -Naur newlib-1.18.0.orig/newlib/libc/search/hash.h newlib-1.18.0/newlib/libc/search/hash.h
old new 82 82 83 83 /* Hash Table Information */ 84 84 typedef struct hashhdr { /* Disk resident portion */ 85 intmagic; /* Magic NO for hash tables */85 __uint32_t magic; /* Magic NO for hash tables */ 86 86 int version; /* Version ID */ 87 87 __uint32_t lorder; /* Byte Order */ 88 88 int bsize; /* Bucket/Page Size */ … … 97 97 int high_mask; /* Mask to modulo into entire table */ 98 98 int low_mask; /* Mask to modulo into lower half of 99 99 * table */ 100 intffactor; /* Fill factor */100 __uint32_t ffactor; /* Fill factor */ 101 101 int nkeys; /* Number of keys in hash table */ 102 102 int hdrpages; /* Size of table header */ 103 103 int h_charkey; /* value of hash(CHARKEY) */ -
newlib/libc/stdlib/putenv_r.c
diff -Naur newlib-1.18.0.orig/newlib/libc/stdlib/putenv_r.c newlib-1.18.0/newlib/libc/stdlib/putenv_r.c
old new 24 24 #include <reent.h> 25 25 #include <stdlib.h> 26 26 #include <string.h> 27 #include <strings.h> 27 28 28 29 #include "envlock.h" 29 30 -
newlib/libc/string/bcmp.c
diff -Naur newlib-1.18.0.orig/newlib/libc/string/bcmp.c newlib-1.18.0/newlib/libc/string/bcmp.c
old new 6 6 bcmp 7 7 8 8 ANSI_SYNOPSIS 9 #include <string .h>9 #include <strings.h> 10 10 int bcmp(const void *<[s1]>, const void *<[s2]>, size_t <[n]>); 11 11 12 12 TRAD_SYNOPSIS 13 #include <string .h>13 #include <strings.h> 14 14 int bcmp(<[s1]>, <[s2]>, <[n]>) 15 15 const void *<[s1]>; 16 16 const void *<[s2]>; … … 35 35 bcmp ansi pure 36 36 */ 37 37 38 #include <string .h>38 #include <strings.h> 39 39 40 40 int 41 41 _DEFUN (bcmp, (m1, m2, n), -
newlib/libc/string/bcopy.c
diff -Naur newlib-1.18.0.orig/newlib/libc/string/bcopy.c newlib-1.18.0/newlib/libc/string/bcopy.c
old new 3 3 <<bcopy>>---copy memory regions 4 4 5 5 ANSI_SYNOPSIS 6 #include <string .h>6 #include <strings.h> 7 7 void bcopy(const void *<[in]>, void *<[out]>, size_t <[n]>); 8 8 9 9 TRAD_SYNOPSIS … … 26 26 bcopy - pure 27 27 */ 28 28 29 #include <string .h>29 #include <strings.h> 30 30 31 31 void 32 32 _DEFUN (bcopy, (b1, b2, length), -
newlib/libc/string/bzero.c
diff -Naur newlib-1.18.0.orig/newlib/libc/string/bzero.c newlib-1.18.0/newlib/libc/string/bzero.c
old new 6 6 bzero 7 7 8 8 ANSI_SYNOPSIS 9 #include <string .h>9 #include <strings.h> 10 10 void bzero(void *<[b]>, size_t <[length]>); 11 11 12 12 TRAD_SYNOPSIS 13 #include <string .h>13 #include <strings.h> 14 14 void bzero(<[b]>, <[length]>) 15 15 void *<[b]>; 16 16 size_t <[length]>; … … 30 30 <<bzero>> requires no supporting OS subroutines. 31 31 */ 32 32 33 #include <string .h>33 #include <strings.h> 34 34 35 35 _VOID 36 36 _DEFUN (bzero, (b, length), -
newlib/libc/string/index.c
diff -Naur newlib-1.18.0.orig/newlib/libc/string/index.c newlib-1.18.0/newlib/libc/string/index.c
old new 10 10 char * index(const char *<[string]>, int <[c]>); 11 11 12 12 TRAD_SYNOPSIS 13 #include <string .h>13 #include <strings.h> 14 14 char * index(<[string]>, <[c]>); 15 15 char *<[string]>; 16 16 int *<[c]>; … … 33 33 index - pure 34 34 */ 35 35 36 #include <string.h> 36 #include <strings.h> 37 #include <string.h> /* strchr */ 37 38 38 39 char * 39 40 _DEFUN (index, (s, c), -
newlib/libc/string/rindex.c
diff -Naur newlib-1.18.0.orig/newlib/libc/string/rindex.c newlib-1.18.0/newlib/libc/string/rindex.c
old new 10 10 char * rindex(const char *<[string]>, int <[c]>); 11 11 12 12 TRAD_SYNOPSIS 13 #include <string .h>13 #include <strings.h> 14 14 char * rindex(<[string]>, <[c]>); 15 15 char *<[string]>; 16 16 int *<[c]>; … … 33 33 rindex - pure 34 34 */ 35 35 36 #include <string.h> 36 #include <strings.h> 37 #include <string.h> /* strchr */ 37 38 38 39 char * 39 40 _DEFUN (rindex, (s, c), -
newlib/libc/string/strcasecmp.c
diff -Naur newlib-1.18.0.orig/newlib/libc/string/strcasecmp.c newlib-1.18.0/newlib/libc/string/strcasecmp.c
old new 38 38 strcasecmp 39 39 */ 40 40 41 #include <string .h>41 #include <strings.h> 42 42 #include <ctype.h> 43 43 44 44 int -
newlib/libc/string/strcat.c
diff -Naur newlib-1.18.0.orig/newlib/libc/string/strcat.c newlib-1.18.0/newlib/libc/string/strcat.c
old new 33 33 strcat ansi pure 34 34 */ 35 35 36 #include <stdint.h> 36 37 #include <string.h> 37 38 #include <limits.h> 38 39 39 40 /* Nonzero if X is aligned on a "long" boundary. */ 40 41 #define ALIGNED(X) \ 41 ((( long)X & (sizeof (long) - 1)) == 0)42 (((uintptr_t)X & (sizeof (long) - 1)) == 0) 42 43 43 44 #if LONG_MAX == 2147483647L 44 45 #define DETECTNULL(X) (((X) - 0x01010101) & ~(X) & 0x80808080) -
newlib/libc/string/strchr.c
diff -Naur newlib-1.18.0.orig/newlib/libc/string/strchr.c newlib-1.18.0/newlib/libc/string/strchr.c
old new 33 33 strchr ansi pure 34 34 */ 35 35 36 #include <stdint.h> 36 37 #include <string.h> 37 38 #include <limits.h> 38 39 39 40 /* Nonzero if X is not aligned on a "long" boundary. */ 40 #define UNALIGNED(X) (( long)X & (sizeof (long) - 1))41 #define UNALIGNED(X) ((uintptr_t)X & (sizeof (long) - 1)) 41 42 42 43 /* How many bytes are loaded each iteration of the word copy loop. */ 43 44 #define LBLOCKSIZE (sizeof (long)) -
newlib/libc/string/strcmp.c
diff -Naur newlib-1.18.0.orig/newlib/libc/string/strcmp.c newlib-1.18.0/newlib/libc/string/strcmp.c
old new 35 35 strcmp ansi pure 36 36 */ 37 37 38 #include <stdint.h> 38 39 #include <string.h> 39 40 #include <limits.h> 40 41 41 42 /* Nonzero if either X or Y is not aligned on a "long" boundary. */ 42 43 #define UNALIGNED(X, Y) \ 43 ((( long)X & (sizeof (long) - 1)) | ((long)Y & (sizeof (long) - 1)))44 (((uintptr_t)X & (sizeof (long) - 1)) | ((uintptr_t)Y & (sizeof (long) - 1))) 44 45 45 46 /* DETECTNULL returns nonzero if (long)X contains a NULL byte. */ 46 47 #if LONG_MAX == 2147483647L -
newlib/libc/string/strncasecmp.c
diff -Naur newlib-1.18.0.orig/newlib/libc/string/strncasecmp.c newlib-1.18.0/newlib/libc/string/strncasecmp.c
old new 6 6 strncasecmp 7 7 8 8 ANSI_SYNOPSIS 9 #include <string .h>9 #include <strings.h> 10 10 int strncasecmp(const char *<[a]>, const char * <[b]>, size_t <[length]>); 11 11 12 12 TRAD_SYNOPSIS 13 #include <string .h>13 #include <strings.h> 14 14 int strncasecmp(<[a]>, <[b]>, <[length]>) 15 15 char *<[a]>; 16 16 char *<[b]>; … … 40 40 strncasecmp 41 41 */ 42 42 43 #include <string .h>43 #include <strings.h> 44 44 #include <ctype.h> 45 45 46 46 int -
newlib/libc/string/strncmp.c
diff -Naur newlib-1.18.0.orig/newlib/libc/string/strncmp.c newlib-1.18.0/newlib/libc/string/strncmp.c
old new 36 36 strncmp ansi pure 37 37 */ 38 38 39 #include <stdint.h> 39 40 #include <string.h> 40 41 #include <limits.h> 41 42 42 43 /* Nonzero if either X or Y is not aligned on a "long" boundary. */ 43 44 #define UNALIGNED(X, Y) \ 44 ((( long)X & (sizeof (long) - 1)) | ((long)Y & (sizeof (long) - 1)))45 (((uintptr_t)X & (sizeof (long) - 1)) | ((uintptr_t)Y & (sizeof (long) - 1))) 45 46 46 47 /* DETECTNULL returns nonzero if (long)X contains a NULL byte. */ 47 48 #if LONG_MAX == 2147483647L -
newlib/libc/sys/rtems/machine/_types.h
diff -Naur newlib-1.18.0.orig/newlib/libc/sys/rtems/machine/_types.h newlib-1.18.0/newlib/libc/sys/rtems/machine/_types.h
old new 31 31 32 32 typedef __int32_t blksize_t; 33 33 typedef __int32_t blkcnt_t; 34 35 /* EXPERIMENTAL: Use 64bit types */ 36 #if defined(__arm__) || defined(__i386__) || defined(__m68k__) || defined(__mips__) || defined(__PPC__) || defined(__sparc__) 37 /* Use 64bit types */ 38 typedef __int64_t _off_t; 39 #define __off_t_defined 1 40 41 typedef __int64_t _fpos_t; 42 #define __fpos_t_defined 1 43 #else 44 /* Use 32bit types */ 45 typedef __int32_t _off_t; 46 #define __off_t_defined 1 47 48 typedef __int32_t _fpos_t; 49 #define __fpos_t_defined 1 50 #endif 51 52 typedef __uint32_t _mode_t; 53 #define __mode_t_defined 1 54 34 55 #endif -
newlib/libc/sys/rtems/sys/dirent.h
diff -Naur newlib-1.18.0.orig/newlib/libc/sys/rtems/sys/dirent.h newlib-1.18.0/newlib/libc/sys/rtems/sys/dirent.h
old new 31 31 void seekdir(DIR *dir, long loc); 32 32 long telldir(DIR *dir); 33 33 34 #ifdef _COMPILING_NEWLIB 35 void _seekdir(DIR *dir, long offset); 36 #endif 37 34 38 #include <sys/types.h> 35 39 36 40 #include <limits.h> -
newlib/libm/common/modfl.c
diff -Naur newlib-1.18.0.orig/newlib/libm/common/modfl.c newlib-1.18.0/newlib/libm/common/modfl.c
old new 36 36 long double 37 37 modfl (long double x, long double *iptr) 38 38 { 39 return modf(x, iptr);39 return modf(x, (double*) iptr); 40 40 } 41 41 #endif 42 42 -
newlib/libm/common/sf_llrint.c
diff -Naur newlib-1.18.0.orig/newlib/libm/common/sf_llrint.c newlib-1.18.0/newlib/libm/common/sf_llrint.c
old new 71 71 GET_FLOAT_WORD (i0, t); 72 72 /* Detect the all-zeros representation of plus and 73 73 minus zero, which fails the calculation below. */ 74 if ((i0 & ~( 1 << 31)) == 0)74 if ((i0 & ~((__uint32_t)1 << 31)) == 0) 75 75 return 0; 76 76 j0 = ((i0 >> 23) & 0xff) - 0x7f; 77 77 i0 &= 0x7fffff; -
newlib/libm/common/sf_round.c
diff -Naur newlib-1.18.0.orig/newlib/libm/common/sf_round.c newlib-1.18.0/newlib/libm/common/sf_round.c
old new 38 38 w &= 0x80000000; 39 39 if (exponent_less_127 == -1) 40 40 /* Result is +1.0 or -1.0. */ 41 w |= ( 127 << 23);41 w |= ((__uint32_t)127 << 23); 42 42 } 43 43 else 44 44 { -
newlib/Makefile.am
diff -Naur newlib-1.18.0.orig/newlib/Makefile.am newlib-1.18.0/newlib/Makefile.am
old new 81 81 libc.a 82 82 endif 83 83 84 noinst_DATA= stmp-targ-include84 BUILT_SOURCES = stmp-targ-include 85 85 86 86 toollib_DATA = $(CRT0) $(CRT1) 87 87 -
newlib/Makefile.in
diff -Naur newlib-1.18.0.orig/newlib/Makefile.in newlib-1.18.0/newlib/Makefile.in
old new 122 122 install-pdf-recursive install-ps-recursive install-recursive \ 123 123 installcheck-recursive installdirs-recursive pdf-recursive \ 124 124 ps-recursive uninstall-recursive 125 DATA = $( noinst_DATA) $(toollib_DATA)125 DATA = $(toollib_DATA) 126 126 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ 127 127 distclean-recursive maintainer-clean-recursive 128 128 AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ … … 351 351 @USE_LIBTOOL_FALSE@toollib_LIBRARIES = libm.a \ 352 352 @USE_LIBTOOL_FALSE@ libc.a 353 353 354 noinst_DATA= stmp-targ-include354 BUILT_SOURCES = stmp-targ-include 355 355 toollib_DATA = $(CRT0) $(CRT1) 356 356 357 357 # The functions ldexp, frexp and modf are traditionally supplied in … … 411 411 412 412 # dejagnu support 413 413 RUNTESTFLAGS = 414 all: newlib.h414 all: $(BUILT_SOURCES) newlib.h 415 415 $(MAKE) $(AM_MAKEFLAGS) all-recursive 416 416 417 417 .SUFFIXES: … … 725 725 done 726 726 check-am: 727 727 $(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU 728 check: check-recursive 728 check: $(BUILT_SOURCES) 729 $(MAKE) $(AM_MAKEFLAGS) check-recursive 729 730 all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) $(DATA) newlib.h 730 731 installdirs: installdirs-recursive 731 732 installdirs-am: 732 733 for dir in "$(DESTDIR)$(toollibdir)" "$(DESTDIR)$(toollibdir)" "$(DESTDIR)$(toollibdir)"; do \ 733 734 test -z "$$dir" || $(MKDIR_P) "$$dir"; \ 734 735 done 735 install: install-recursive 736 install: $(BUILT_SOURCES) 737 $(MAKE) $(AM_MAKEFLAGS) install-recursive 736 738 install-exec: install-exec-recursive 737 739 install-data: install-data-recursive 738 740 uninstall: uninstall-recursive … … 758 760 maintainer-clean-generic: 759 761 @echo "This command is intended for maintainers to use" 760 762 @echo "it deletes files that may require special tools to rebuild." 763 -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) 761 764 clean: clean-recursive 762 765 763 766 clean-am: clean-generic clean-libtool clean-toollibLIBRARIES \ … … 833 836 uninstall-am: uninstall-toollibDATA uninstall-toollibLIBRARIES \ 834 837 uninstall-toollibLTLIBRARIES 835 838 836 .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check-am \ 837 ctags-recursive install-am install-strip tags-recursive 839 .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \ 840 check-am ctags-recursive install install-am install-strip \ 841 tags-recursive 838 842 839 843 .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ 840 844 all all-am am--refresh check check-DEJAGNU check-am clean \
Note: See TracBrowser
for help on using the repository browser.