source: rtems/contrib/crossrpms/patches/newlib-1.15.0-rtems4.8-20080903.diff @ d8fce03

4.8
Last change on this file since d8fce03 was e5bbe57, checked in by Ralf Corsepius <ralf.corsepius@…>, on 09/03/08 at 09:26:39

Remove support for c4x.
Backport arm-endianness hack from rtems-4.10.

  • Property mode set to 100644
File size: 33.9 KB
  • newlib/libc/include/inttypes.h

    diff -Naur newlib-1.15.0.orig/newlib/libc/include/inttypes.h newlib-1.15.0/newlib/libc/include/inttypes.h
    old new  
    242242#define SCNxMAX         __SCNMAX(x)
    243243
    244244/* ptr types */
    245 #if __have_longlong64
    246 #define __PRIPTR(x) __STRINGIFY(ll##x)
    247 #define __SCNPTR(x) __STRINGIFY(ll##x)
     245#if __ptrint_t_long_defined
     246#define __PRIPTR(x) __STRINGIFY(l##x)
     247#define __SCNPTR(x) __STRINGIFY(l##x)
     248#elif __ptrint_t_int_defined
     249#define __PRIPTR(x) __STRINGIFY(x)
     250#define __SCNPTR(x) __STRINGIFY(x)
    248251#elif __have_long64
    249252#define __PRIPTR(x) __STRINGIFY(l##x)
    250253#define __SCNPTR(x) __STRINGIFY(l##x)
  • newlib/libc/include/machine/ieeefp.h

    diff -Naur newlib-1.15.0.orig/newlib/libc/include/machine/ieeefp.h newlib-1.15.0/newlib/libc/include/machine/ieeefp.h
    old new  
    6262#  define __IEEE_BIG_ENDIAN
    6363# endif
    6464#else
    65 # define __IEEE_BIG_ENDIAN
    6665# ifdef __ARMEL__
     66#  define __IEEE_LITTLE_ENDIAN
     67# else
     68#  define __IEEE_BIG_ENDIAN
     69# endif
     70# ifdef __ARMWEL__
    6771#  define __IEEE_BYTES_LITTLE_ENDIAN
    6872# endif
    6973#endif
  • newlib/libc/include/machine/setjmp.h

    diff -Naur newlib-1.15.0.orig/newlib/libc/include/machine/setjmp.h newlib-1.15.0/newlib/libc/include/machine/setjmp.h
    old new  
    2727
    2828/* necv70 was 9 as well. */
    2929
    30 #ifdef __mc68000__
     30#if defined(__m68k__) || defined(__mc68000__)
    3131/*
    3232 * onsstack,sigmask,sp,pc,psl,d2-d7,a2-a6,
    3333 * fp2-fp7      for 68881.
  • newlib/libc/include/stdint.h

    diff -Naur newlib-1.15.0.orig/newlib/libc/include/stdint.h newlib-1.15.0/newlib/libc/include/stdint.h
    old new  
    348348#endif
    349349
    350350/* This must match size_t in stddef.h, currently long unsigned int */
    351 #define SIZE_MIN (-__STDINT_EXP(LONG_MAX) - 1L)
    352 #define SIZE_MAX __STDINT_EXP(LONG_MAX)
     351#define SIZE_MAX (__STDINT_EXP(LONG_MAX) * 2UL + 1)
    353352
    354353/* This must match sig_atomic_t in <signal.h> (currently int) */
    355354#define SIG_ATOMIC_MIN (-__STDINT_EXP(INT_MAX) - 1)
     
    393392#define UINTMAX_C(x)    x##UL
    394393#endif
    395394
     395#ifdef __rtems__
     396#include <machine/stdint.h>
     397#endif
    396398
    397399#ifdef __cplusplus
    398400}
  • newlib/libc/include/sys/errno.h

    diff -Naur newlib-1.15.0.orig/newlib/libc/include/sys/errno.h newlib-1.15.0/newlib/libc/include/sys/errno.h
    old new  
    148148#define ECASECLASH 137  /* Filename exists with different case */
    149149#define EILSEQ 138
    150150#define EOVERFLOW 139   /* Value too large for defined data type */
     151#define ECANCELED 140   /* Operation canceled. */
    151152
    152153/* From cygwin32.  */
    153154#define EWOULDBLOCK EAGAIN      /* Operation would block */
  • newlib/libc/include/sys/features.h

    diff -Naur newlib-1.15.0.orig/newlib/libc/include/sys/features.h newlib-1.15.0/newlib/libc/include/sys/features.h
    old new  
    3838#define _POSIX_MEMLOCK_RANGE            1
    3939#define _POSIX_MEMORY_PROTECTION        1
    4040#define _POSIX_MESSAGE_PASSING          1
     41#define _POSIX_MONOTONIC_CLOCK          200112L
    4142#define _POSIX_PRIORITIZED_IO           1
    4243#define _POSIX_PRIORITY_SCHEDULING      1
    4344#define _POSIX_REALTIME_SIGNALS         1
     
    8182#endif
    8283
    8384#ifdef __CYGWIN__
    84 # define _POSIX_JOB_CONTROL                     1
    85 # define _POSIX_SAVED_IDS                       0
    86 # define _POSIX_VERSION                         199009L
    87 # define _POSIX_THREADS                         1
    88 # define _POSIX_THREAD_PROCESS_SHARED           1
    89 # define _POSIX_THREAD_SAFE_FUNCTIONS           1
    90 # define _POSIX_THREAD_PRIORITY_SCHEDULING      1
    91 # define _POSIX_THREAD_ATTR_STACKSIZE           1
    92 # define _POSIX_SEMAPHORES                      1
    93 # define _POSIX_TIMERS                          1
    94 # define _POSIX_MEMLOCK_RANGE                   1
     85
     86#if !defined(__STRICT_ANSI__) || defined(__cplusplus) || __STDC_VERSION__ >= 199901L
     87#define _POSIX_VERSION                          200112L
     88#define _POSIX2_VERSION                         200112L
     89#define _XOPEN_VERSION                             600
     90
     91#define _POSIX_ADVISORY_INFO                    200112L
     92/* #define _POSIX_ASYNCHRONOUS_IO                   -1 */
     93/* #define _POSIX_BARRIERS                          -1 */
     94#define _POSIX_CHOWN_RESTRICTED                      1
     95/* #define _POSIX_CLOCK_SELECTION                   -1 */
     96/* #define _POSIX_CPUTIME                           -1 */
     97#define _POSIX_FSYNC                            200112L
     98#define _POSIX_IPV6                             200112L
     99#define _POSIX_JOB_CONTROL                           1
     100#define _POSIX_MAPPED_FILES                     200112L
     101/* #define _POSIX_MEMLOCK                           -1 */
     102#define _POSIX_MEMLOCK_RANGE                    200112L
     103#define _POSIX_MEMORY_PROTECTION                200112L
     104#define _POSIX_MESSAGE_PASSING                  200112L
     105/* #define _POSIX_MONOTONIC_CLOCK                   -1 */
     106#define _POSIX_NO_TRUNC                              1
     107/* #define _POSIX_PRIORITIZED_IO                    -1 */
     108#define _POSIX_PRIORITY_SCHEDULING              200112L
     109#define _POSIX_RAW_SOCKETS                      200112L
     110#define _POSIX_READER_WRITER_LOCKS              200112L
     111#define _POSIX_REALTIME_SIGNALS                 200112L
     112#define _POSIX_REGEXP                                1
     113#define _POSIX_SAVED_IDS                             1
     114#define _POSIX_SEMAPHORES                       200112L
     115#define _POSIX_SHARED_MEMORY_OBJECTS            200112L
     116#define _POSIX_SHELL                                 1
     117/* #define _POSIX_SPAWN                             -1 */
     118/* #define _POSIX_SPIN_LOCKS                        -1 */
     119/* #define _POSIX_SPORADIC_SERVER                   -1 */
     120#define _POSIX_SYNCHRONIZED_IO                  200112L
     121/* #define _POSIX_THREAD_ATTR_STACKADDR             -1 */
     122#define _POSIX_THREAD_ATTR_STACKSIZE            200112L
     123/* #define _POSIX_THREAD_CPUTIME                    -1 */
     124/* #define _POSIX_THREAD_PRIO_INHERIT               -1 */
     125/* #define _POSIX_THREAD_PRIO_PROTECT               -1 */
     126#define _POSIX_THREAD_PRIORITY_SCHEDULING       200112L
     127#define _POSIX_THREAD_PROCESS_SHARED            200112L
     128#define _POSIX_THREAD_SAFE_FUNCTIONS            200112L
     129/* #define _POSIX_THREAD_SPORADIC_SERVER            -1 */
     130#define _POSIX_THREADS                          200112L
     131/* #define _POSIX_TIMEOUTS                          -1 */
     132#define _POSIX_TIMERS                                1
     133/* #define _POSIX_TRACE                             -1 */
     134/* #define _POSIX_TRACE_EVENT_FILTER                -1 */
     135/* #define _POSIX_TRACE_INHERIT                     -1 */
     136/* #define _POSIX_TRACE_LOG                         -1 */
     137/* #define _POSIX_TYPED_MEMORY_OBJECTS              -1 */
     138#define _POSIX_VDISABLE                            '\0'
     139#define _POSIX2_C_BIND                          200112L
     140#define _POSIX2_C_DEV                           200112L
     141#define _POSIX2_CHAR_TERM                       200112L
     142/* #define _POSIX2_FORT_DEV                         -1 */
     143/* #define _POSIX2_FORT_RUN                         -1 */
     144/* #define _POSIX2_LOCALEDEF                        -1 */
     145/* #define _POSIX2_PBS                              -1 */
     146/* #define _POSIX2_PBS_ACCOUNTING                   -1 */
     147/* #define _POSIX2_PBS_CHECKPOINT                   -1 */
     148/* #define _POSIX2_PBS_LOCATE                       -1 */
     149/* #define _POSIX2_PBS_MESSAGE                      -1 */
     150/* #define _POSIX2_PBS_TRACK                        -1 */
     151#define _POSIX2_SW_DEV                          200112L
     152#define _POSIX2_UPE                             200112L
     153/* #define _POSIX_V6_ILP32_OFF32                    -1 */
     154#define _XBS5_ILP32_OFF32                       _POSIX_V6_ILP32_OFF32
     155#define _POSIX_V6_ILP32_OFFBIG                       1
     156#define _XBS5_ILP32_OFFBIG                      _POSIX_V6_ILP32_OFFBIG
     157/* #define _POSIX_V6_LP64_OFF64                     -1 */
     158#define _XBS5_LP64_OFF64                        _POSIX_V6_LP64_OFF64
     159/* #define _POSIX_V6_LPBIG_OFFBIG                   -1 */
     160#define _XBS5_LPBIG_OFFBIG                      _POSIX_V6_LPBIG_OFFBIG
     161#define _XOPEN_CRYPT                                 1
     162#define _XOPEN_ENH_I18N                              1
     163/* #define _XOPEN_LEGACY                            -1 */
     164/* #define _XOPEN_REALTIME                          -1 */
     165/* #define _XOPEN_REALTIME_THREADS                  -1 */
     166#define _XOPEN_SHM                                   1
     167/* #define _XOPEN_STREAMS                           -1 */
     168/* #define _XOPEN_UNIX                              -1 */
     169
     170#endif /* !__STRICT_ANSI__ || __cplusplus || __STDC_VERSION__ >= 199901L */
     171#endif /* __CYGWIN__ */
     172
     173#ifdef __SPU__
     174/* Not much for now! */
     175#define _POSIX_TIMERS                                1
    95176#endif
    96177
    97178#ifdef __cplusplus
  • newlib/libc/include/sys/time.h

    diff -Naur newlib-1.15.0.orig/newlib/libc/include/sys/time.h newlib-1.15.0/newlib/libc/include/sys/time.h
    old new  
    7070  } while (0)
    7171#endif /* defined (__rtems__) || defined (__CYGWIN__) */
    7272
    73 int _EXFUN(gettimeofday, (struct timeval *__p, struct timezone *__z));
     73int _EXFUN(gettimeofday, (struct timeval *__p, void *__tz));
    7474int _EXFUN(settimeofday, (const struct timeval *, const struct timezone *));
    7575int _EXFUN(utimes, (const char *__path, const struct timeval *__tvp));
    7676int _EXFUN(getitimer, (int __which, struct itimerval *__value));
  • newlib/libc/include/sys/_types.h

    diff -Naur newlib-1.15.0.orig/newlib/libc/include/sys/_types.h newlib-1.15.0/newlib/libc/include/sys/_types.h
    old new  
    3939/* Iconv descriptor type */
    4040typedef void *_iconv_t;
    4141
     42typedef long * __intptr_t;
     43typedef unsigned long* __uintptr_t;
     44
    4245#endif  /* _SYS__TYPES_H */
  • newlib/libc/include/sys/unistd.h

    diff -Naur newlib-1.15.0.orig/newlib/libc/include/sys/unistd.h newlib-1.15.0/newlib/libc/include/sys/unistd.h
    old new  
    2727int     _EXFUN(chroot, (const char *__path ));
    2828#endif
    2929int     _EXFUN(close, (int __fildes ));
     30#if defined(__CYGWIN__)
     31size_t  _EXFUN(confstr, (int __name, char *__buf, size_t __len));
     32#endif
    3033char    _EXFUN(*ctermid, (char *__s ));
    3134char    _EXFUN(*cuserid, (char *__s ));
    3235#if defined(__CYGWIN__)
     
    151154int     _EXFUN(ttyname_r, (int, char *, size_t));
    152155#endif
    153156int     _EXFUN(unlink, (const char *__path ));
     157int     _EXFUN(usleep, (useconds_t __useconds));
    154158int     _EXFUN(vhangup, (void ));
    155159_READ_WRITE_RETURN_TYPE _EXFUN(write, (int __fd, const void *__buf, size_t __nbyte ));
    156160
     
    196200int     _EXFUN(truncate, (const char *, off_t __length));
    197201#endif
    198202#endif
     203
    199204#if defined(__CYGWIN__) || defined(__rtems__)
    200205int     _EXFUN(getdtablesize, (void));
    201206int     _EXFUN(setdtablesize, (int));
    202207useconds_t _EXFUN(ualarm, (useconds_t __useconds, useconds_t __interval));
    203 unsigned _EXFUN(usleep, (unsigned int __useconds));
    204208#if !(defined  (_WINSOCK_H) || defined (__USE_W32_SOCKETS))
    205209/* winsock[2].h defines as __stdcall, and with int as 2nd arg */
    206210 int    _EXFUN(gethostname, (char *__name, size_t __len));
    207211#endif
    208212char *  _EXFUN(mktemp, (char *));
    209 #if defined(__CYGWIN__)
     213#if defined(__CYGWIN__) || defined(__rtems__)
    210214void    _EXFUN(sync, (void));
    211 #else /* defined(__rtems__) */
    212 int     _EXFUN(sync, (void));
    213215#endif
    214216#endif
    215 int     _EXFUN(readlink, (const char *__path, char *__buf, int __buflen));
     217ssize_t _EXFUN(readlink, (const char *__path, char *__buf, size_t __buflen));
    216218int     _EXFUN(symlink, (const char *__name1, const char *__name2));
    217219
    218220#define F_OK    0
     
    231233#define STDERR_FILENO   2       /* standard error file descriptor */
    232234
    233235/*
    234  *  4.8.1 Get Configurable System Variables, P1003.1b-1993, p. 96
    235  *
    236  *  NOTE: Table 4-2, Configurable System Variables, p. 96
    237  */
    238 
    239 #define _SC_ARG_MAX                 0
    240 #define _SC_CHILD_MAX               1
    241 #define _SC_CLK_TCK                 2
    242 #define _SC_NGROUPS_MAX             3
    243 #define _SC_OPEN_MAX                4
    244   /* no _SC_STREAM_MAX */
    245 #define _SC_JOB_CONTROL             5
    246 #define _SC_SAVED_IDS               6
    247 #define _SC_VERSION                 7
    248 #define _SC_PAGESIZE                8
    249 /* CYGWIN-specific values .. do not touch */
    250 #define _SC_NPROCESSORS_CONF        9
    251 #define _SC_NPROCESSORS_ONLN       10
    252 #define _SC_PHYS_PAGES             11
    253 #define _SC_AVPHYS_PAGES           12
    254 /* end of CYGWIN-specific values */
    255 #define _SC_MQ_OPEN_MAX            13
    256 #define _SC_MQ_PRIO_MAX            14
    257 #define _SC_RTSIG_MAX              15
    258 #define _SC_SEM_NSEMS_MAX          16
    259 #define _SC_SEM_VALUE_MAX          17
    260 #define _SC_SIGQUEUE_MAX           18
    261 #define _SC_TIMER_MAX              19
    262 #define _SC_TZNAME_MAX             20
    263 
    264 #define _SC_ASYNCHRONOUS_IO        21
    265 #define _SC_FSYNC                  22
    266 #define _SC_MAPPED_FILES           23
    267 #define _SC_MEMLOCK                24
    268 #define _SC_MEMLOCK_RANGE          25
    269 #define _SC_MEMORY_PROTECTION      26
    270 #define _SC_MESSAGE_PASSING        27
    271 #define _SC_PRIORITIZED_IO         28
    272 #define _SC_REALTIME_SIGNALS       29
    273 #define _SC_SEMAPHORES             30
    274 #define _SC_SHARED_MEMORY_OBJECTS  31
    275 #define _SC_SYNCHRONIZED_IO        32
    276 #define _SC_TIMERS                 33
    277 #define _SC_AIO_LISTIO_MAX         34
    278 #define _SC_AIO_MAX                35
    279 #define _SC_AIO_PRIO_DELTA_MAX     36
    280 #define _SC_DELAYTIMER_MAX         37
    281 
    282 /*
    283  *  P1003.1c/D10, p. 52 adds the following.
     236 *  sysconf values per IEEE Std 1003.1, 2004 Edition
    284237 */
    285238
     239#define _SC_ARG_MAX                       0
     240#define _SC_CHILD_MAX                     1
     241#define _SC_CLK_TCK                       2
     242#define _SC_NGROUPS_MAX                   3
     243#define _SC_OPEN_MAX                      4
     244#define _SC_JOB_CONTROL                   5
     245#define _SC_SAVED_IDS                     6
     246#define _SC_VERSION                       7
     247#define _SC_PAGESIZE                      8
     248#define _SC_PAGE_SIZE                     _SC_PAGESIZE
     249/* These are non-POSIX values we accidentally introduced in 2000 without
     250   guarding them.  Keeping them unguarded for backward compatibility. */
     251#define _SC_NPROCESSORS_CONF              9
     252#define _SC_NPROCESSORS_ONLN             10
     253#define _SC_PHYS_PAGES                   11
     254#define _SC_AVPHYS_PAGES                 12
     255/* End of non-POSIX values. */
     256#define _SC_MQ_OPEN_MAX                  13
     257#define _SC_MQ_PRIO_MAX                  14
     258#define _SC_RTSIG_MAX                    15
     259#define _SC_SEM_NSEMS_MAX                16
     260#define _SC_SEM_VALUE_MAX                17
     261#define _SC_SIGQUEUE_MAX                 18
     262#define _SC_TIMER_MAX                    19
     263#define _SC_TZNAME_MAX                   20
     264#define _SC_ASYNCHRONOUS_IO              21
     265#define _SC_FSYNC                        22
     266#define _SC_MAPPED_FILES                 23
     267#define _SC_MEMLOCK                      24
     268#define _SC_MEMLOCK_RANGE                25
     269#define _SC_MEMORY_PROTECTION            26
     270#define _SC_MESSAGE_PASSING              27
     271#define _SC_PRIORITIZED_IO               28
     272#define _SC_REALTIME_SIGNALS             29
     273#define _SC_SEMAPHORES                   30
     274#define _SC_SHARED_MEMORY_OBJECTS        31
     275#define _SC_SYNCHRONIZED_IO              32
     276#define _SC_TIMERS                       33
     277#define _SC_AIO_LISTIO_MAX               34
     278#define _SC_AIO_MAX                      35
     279#define _SC_AIO_PRIO_DELTA_MAX           36
     280#define _SC_DELAYTIMER_MAX               37
    286281#define _SC_THREAD_KEYS_MAX              38
    287282#define _SC_THREAD_STACK_MIN             39
    288283#define _SC_THREAD_THREADS_MAX           40
    289284#define _SC_TTY_NAME_MAX                 41
    290 
    291285#define _SC_THREADS                      42
    292286#define _SC_THREAD_ATTR_STACKADDR        43
    293287#define _SC_THREAD_ATTR_STACKSIZE        44
     
    302296#define _SC_GETPW_R_SIZE_MAX             51
    303297#define _SC_LOGIN_NAME_MAX               52
    304298#define _SC_THREAD_DESTRUCTOR_ITERATIONS 53
     299#define _SC_ADVISORY_INFO                54
     300#define _SC_ATEXIT_MAX                   55
     301#define _SC_BARRIERS                     56
     302#define _SC_BC_BASE_MAX                  57
     303#define _SC_BC_DIM_MAX                   58
     304#define _SC_BC_SCALE_MAX                 59
     305#define _SC_BC_STRING_MAX                60
     306#define _SC_CLOCK_SELECTION              61
     307#define _SC_COLL_WEIGHTS_MAX             62
     308#define _SC_CPUTIME                      63
     309#define _SC_EXPR_NEST_MAX                64
     310#define _SC_HOST_NAME_MAX                65
     311#define _SC_IOV_MAX                      66
     312#define _SC_IPV6                         67
     313#define _SC_LINE_MAX                     68
     314#define _SC_MONOTONIC_CLOCK              69
     315#define _SC_RAW_SOCKETS                  70
     316#define _SC_READER_WRITER_LOCKS          71
     317#define _SC_REGEXP                       72
     318#define _SC_RE_DUP_MAX                   73
     319#define _SC_SHELL                        74
     320#define _SC_SPAWN                        75
     321#define _SC_SPIN_LOCKS                   76
     322#define _SC_SPORADIC_SERVER              77
     323#define _SC_SS_REPL_MAX                  78
     324#define _SC_SYMLOOP_MAX                  79
     325#define _SC_THREAD_CPUTIME               80
     326#define _SC_THREAD_SPORADIC_SERVER       81
     327#define _SC_TIMEOUTS                     82
     328#define _SC_TRACE                        83
     329#define _SC_TRACE_EVENT_FILTER           84
     330#define _SC_TRACE_EVENT_NAME_MAX         85
     331#define _SC_TRACE_INHERIT                86
     332#define _SC_TRACE_LOG                    87
     333#define _SC_TRACE_NAME_MAX               88
     334#define _SC_TRACE_SYS_MAX                89
     335#define _SC_TRACE_USER_EVENT_MAX         90
     336#define _SC_TYPED_MEMORY_OBJECTS         91
     337#define _SC_V6_ILP32_OFF32               92
     338#define _SC_XBS5_ILP32_OFF32             _SC_V6_ILP32_OFF32
     339#define _SC_V6_ILP32_OFFBIG              93
     340#define _SC_XBS5_ILP32_OFFBIG            _SC_V6_ILP32_OFFBIG
     341#define _SC_V6_LP64_OFF64                94
     342#define _SC_XBS5_LP64_OFF64              _SC_V6_LP64_OFF64
     343#define _SC_V6_LPBIG_OFFBIG              95
     344#define _SC_XBS5_LPBIG_OFFBIG            _SC_V6_LPBIG_OFFBIG
     345#define _SC_XOPEN_CRYPT                  96
     346#define _SC_XOPEN_ENH_I18N               97
     347#define _SC_XOPEN_LEGACY                 98
     348#define _SC_XOPEN_REALTIME               99
     349#define _SC_STREAM_MAX                  100
     350#define _SC_PRIORITY_SCHEDULING         101
     351#define _SC_XOPEN_REALTIME_THREADS      102
     352#define _SC_XOPEN_SHM                   103
     353#define _SC_XOPEN_STREAMS               104
     354#define _SC_XOPEN_UNIX                  105
     355#define _SC_XOPEN_VERSION               106
     356#define _SC_2_CHAR_TERM                 107
     357#define _SC_2_C_BIND                    108
     358#define _SC_2_C_DEV                     109
     359#define _SC_2_FORT_DEV                  110
     360#define _SC_2_FORT_RUN                  111
     361#define _SC_2_LOCALEDEF                 112
     362#define _SC_2_PBS                       113
     363#define _SC_2_PBS_ACCOUNTING            114
     364#define _SC_2_PBS_CHECKPOINT            115
     365#define _SC_2_PBS_LOCATE                116
     366#define _SC_2_PBS_MESSAGE               117
     367#define _SC_2_PBS_TRACK                 118
     368#define _SC_2_SW_DEV                    119
     369#define _SC_2_UPE                       120
     370#define _SC_2_VERSION                   121
    305371
    306 #if !defined(__rtems__)
    307 #define _SC_STREAM_MAX                  100
    308 #endif
    309 #if !defined(__CYGWIN__) && !defined(__rtems__)
    310 #define _SC_PRIORITY_SCHEDULING         101
    311 #endif
    312  
    313 # define        _PC_LINK_MAX            0
    314 # define        _PC_MAX_CANON           1
    315 # define        _PC_MAX_INPUT           2
    316 # define        _PC_NAME_MAX            3
    317 # define        _PC_PATH_MAX            4
    318 # define        _PC_PIPE_BUF            5
    319 # define        _PC_CHOWN_RESTRICTED    6
    320 # define        _PC_NO_TRUNC            7
    321 # define        _PC_VDISABLE            8
    322 # define        _PC_ASYNC_IO            9
    323 # define        _PC_PRIO_IO            10
    324 # define        _PC_SYNC_IO            11
    325 # define        _PC_FILESIZEBITS       12
    326 # define        _PC_2_SYMLINKS         13
    327 # define        _PC_SYMLINK_MAX        14
     372/*
     373 *  pathconf values per IEEE Std 1003.1, 2004 Edition
     374 */
     375
     376#define _PC_LINK_MAX                      0
     377#define _PC_MAX_CANON                     1
     378#define _PC_MAX_INPUT                     2
     379#define _PC_NAME_MAX                      3
     380#define _PC_PATH_MAX                      4
     381#define _PC_PIPE_BUF                      5
     382#define _PC_CHOWN_RESTRICTED              6
     383#define _PC_NO_TRUNC                      7
     384#define _PC_VDISABLE                      8
     385#define _PC_ASYNC_IO                      9
     386#define _PC_PRIO_IO                      10
     387#define _PC_SYNC_IO                      11
     388#define _PC_FILESIZEBITS                 12
     389#define _PC_2_SYMLINKS                   13
     390#define _PC_SYMLINK_MAX                  14
    328391#ifdef __CYGWIN__
    329392/* Ask for POSIX permission bits support. */
    330 # define        _PC_POSIX_PERMISSIONS   90
     393#define _PC_POSIX_PERMISSIONS            90
    331394/* Ask for full POSIX permission support including uid/gid settings. */
    332 # define        _PC_POSIX_SECURITY     91
     395#define _PC_POSIX_SECURITY               91
    333396#endif
    334397
    335 /* FIXME: This is temporary until winsup gets sorted out.  */
    336 #ifdef __CYGWIN__
    337 #define MAXPATHLEN (260 - 1 /* NUL */)
    338 #else
     398/*
     399 *  confstr values per IEEE Std 1003.1, 2004 Edition
     400 */
     401
     402#ifdef __CYGWIN__       /* Only defined on Cygwin for now. */
     403#define _CS_PATH                               0
     404#define _CS_POSIX_V6_ILP32_OFF32_CFLAGS        1
     405#define _CS_XBS5_ILP32_OFF32_CFLAGS           _CS_POSIX_V6_ILP32_OFF32_CFLAGS
     406#define _CS_POSIX_V6_ILP32_OFF32_LDFLAGS       2
     407#define _CS_XBS5_ILP32_OFF32_LDFLAGS          _CS_POSIX_V6_ILP32_OFF32_LDFLAGS
     408#define _CS_POSIX_V6_ILP32_OFF32_LIBS          3
     409#define _CS_XBS5_ILP32_OFF32_LIBS             _CS_POSIX_V6_ILP32_OFF32_LIBS
     410#define _CS_XBS5_ILP32_OFF32_LINTFLAGS         4
     411#define _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS       5
     412#define _CS_XBS5_ILP32_OFFBIG_CFLAGS          _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS
     413#define _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS      6
     414#define _CS_XBS5_ILP32_OFFBIG_LDFLAGS         _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS
     415#define _CS_POSIX_V6_ILP32_OFFBIG_LIBS         7
     416#define _CS_XBS5_ILP32_OFFBIG_LIBS            _CS_POSIX_V6_ILP32_OFFBIG_LIBS
     417#define _CS_XBS5_ILP32_OFFBIG_LINTFLAGS        8
     418#define _CS_POSIX_V6_LP64_OFF64_CFLAGS         9
     419#define _CS_XBS5_LP64_OFF64_CFLAGS            _CS_POSIX_V6_LP64_OFF64_CFLAGS
     420#define _CS_POSIX_V6_LP64_OFF64_LDFLAGS       10
     421#define _CS_XBS5_LP64_OFF64_LDFLAGS           _CS_POSIX_V6_LP64_OFF64_LDFLAGS
     422#define _CS_POSIX_V6_LP64_OFF64_LIBS          11
     423#define _CS_XBS5_LP64_OFF64_LIBS              _CS_POSIX_V6_LP64_OFF64_LIBS
     424#define _CS_XBS5_LP64_OFF64_LINTFLAGS         12
     425#define _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS      13
     426#define _CS_XBS5_LPBIG_OFFBIG_CFLAGS          _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS
     427#define _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS     14
     428#define _CS_XBS5_LPBIG_OFFBIG_LDFLAGS         _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS
     429#define _CS_POSIX_V6_LPBIG_OFFBIG_LIBS        15
     430#define _CS_XBS5_LPBIG_OFFBIG_LIBS            _CS_POSIX_V6_LPBIG_OFFBIG_LIBS
     431#define _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS       16
     432#define _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS    17
     433#endif
     434
     435#ifndef __CYGWIN__
    339436# define        MAXPATHLEN      1024
    340437#endif
    341438
  • newlib/libc/include/tar.h

    diff -Naur newlib-1.15.0.orig/newlib/libc/include/tar.h newlib-1.15.0/newlib/libc/include/tar.h
    old new  
     1/*
     2 * tar.h
     3 */
     4
     5#ifndef _TAR_H
     6#define _TAR_H
     7
     8/* General definitions */
     9#define TMAGIC          "ustar" /* ustar plus null byte. */
     10#define TMAGLEN         6       /* Length of the above. */
     11#define TVERSION        "00"    /* 00 without a null byte. */
     12#define TVERSLEN        2       /* Length of the above. */
     13
     14/* Typeflag field definitions */
     15#define REGTYPE         '0'     /* Regular file. */
     16#define AREGTYPE        '\0'    /* Regular file. */
     17#define LNKTYPE         '1'     /* Link. */
     18#define SYMTYPE         '2'     /* Symbolic link. */
     19#define CHRTYPE         '3'     /* Character special. */
     20#define BLKTYPE         '4'     /* Block special. */
     21#define DIRTYPE         '5'     /* Directory. */
     22#define FIFOTYPE        '6'     /* FIFO special. */
     23#define CONTTYPE        '7'     /* Reserved. */
     24
     25/* Mode field bit definitions (octal) */
     26#define TSUID           04000   /* Set UID on execution. */
     27#define TSGID           02000   /* Set GID on execution. */
     28#define TSVTX           01000   /* On directories, restricted deletion flag. */
     29#define TUREAD          00400   /* Read by owner. */
     30#define TUWRITE         00200   /* Write by owner. */
     31#define TUEXEC          00100   /* Execute/search by owner. */
     32#define TGREAD          00040   /* Read by group. */
     33#define TGWRITE         00020   /* Write by group. */
     34#define TGEXEC          00010   /* Execute/search by group. */
     35#define TOREAD          00004   /* Read by other. */
     36#define TOWRITE         00002   /* Write by other. */
     37#define TOEXEC          00001   /* Execute/search by other. */
     38
     39#endif
  • newlib/libc/include/time.h

    diff -Naur newlib-1.15.0.orig/newlib/libc/include/time.h newlib-1.15.0/newlib/libc/include/time.h
    old new  
    226226
    227227#endif
    228228
     229#if defined(_POSIX_MONOTONIC_CLOCK)
     230
     231/*  The identifier for the system-wide monotonic clock, which is defined
     232    as a clock whose value cannot be set via clock_settime() and which
     233    cannot have backward clock jumps. */
     234
     235#define CLOCK_MONOTONIC (clockid_t)4
     236
     237#endif
     238
    229239#if defined(_POSIX_CPUTIME)
    230240
    231241/* Accessing a Process CPU-time CLock, P1003.4b/D8, p. 55 */
  • newlib/libc/machine/arm/machine/endian.h

    diff -Naur newlib-1.15.0.orig/newlib/libc/machine/arm/machine/endian.h newlib-1.15.0/newlib/libc/machine/arm/machine/endian.h
    old new  
    1 /* ARM configuration file */
    2 
    3 #ifndef _MACHINE_ENDIAN_H
    4 # define _MACHINE_ENDIAN_H
    5 
    6 #ifdef __ARMEB__
    7 #define BYTE_ORDER BIG_ENDIAN
    8 #else
    9 #define BYTE_ORDER LITTLE_ENDIAN
    10 #endif
    11 
    12 #endif
  • newlib/libc/machine/powerpc/setjmp.S

    diff -Naur newlib-1.15.0.orig/newlib/libc/machine/powerpc/setjmp.S newlib-1.15.0/newlib/libc/machine/powerpc/setjmp.S
    old new  
    55#include "ppc-asm.h"
    66
    77FUNC_START(setjmp)
    8 #ifdef __ALTIVEC__
    9         addi    3,3,15          # align Altivec to 16 byte boundary
     8      mfmsr   4
     9      rlwinm. 4,4,0,6,6       # check MSR_VE
     10      addi    3,3,7
     11      rlwinm  3,3,0,0,28  # align to 8 byte boundary
     12      beq             1f
     13    addi      3,3,15          # VE is enabled; align to 16 byte bdry
    1014        rlwinm  3,3,0,0,27
    11 #else
    12         addi    3,3,7           # align to 8 byte boundary
    13         rlwinm  3,3,0,0,28
    14 #endif
     151:
    1516        stw     1,0(3)          # offset 0
    1617        stwu    2,4(3)          # offset 4
    1718        stwu    13,4(3)         # offset 8
     
    3940        stwu    4,4(3)          # offset 88
    4041                                # one word pad to get floating point aligned on 8 byte boundary
    4142#ifndef _SOFT_FLOAT
     43      mfmsr   4
     44      rlwinm. 4,4,0,18,18
     45      bne             1f                      # only save FPregs if FPU is enabled
     46      addi    3,3,18*8        # skip FPregs
     47      b               2f
     481:
    4249        stfdu   14,8(3)         # offset 96
    4350        stfdu   15,8(3)         # offset 104
    4451        stfdu   16,8(3)         # offset 112
     
    5764        stfdu   29,8(3)         # offset 216
    5865        stfdu   30,8(3)         # offset 224
    5966        stfdu   31,8(3)         # offset 232
     672:
    6068#endif
    6169
    6270        /* This requires a total of 21 * 4 + 18 * 8 + 4 + 4 + 4
    6371           bytes == 60 * 4 bytes == 240 bytes.  */
    6472
    65 #ifdef __ALTIVEC__
     73#if defined(__ALTIVEC__)
     74      /* could reuse r4 but I reload it just in case the code changes... */
     75      mfmsr   4
     76      rlwinm. 4,4,0,6,6       # check MSR_VE
     77      bne             1f                      # only save vector regs if altivec is enabled
     78      addi    3,3,(8 + 12*16) # skip vector regs
     79      b               2f
     801:
    6681        /* save Altivec vrsave and vr20-vr31 registers */
    6782        mfspr   4,256           # vrsave register
    6883        stwu    4,16(3)         # offset 248
     
    90105        stvx    30,0,3          # offset 416
    91106        addi    3,3,16
    92107        stvx    31,0,3          # offset 432
     1082:
    93109
    94110        /* This requires a total of 240 + 8 + 8 + 12 * 16 == 448 bytes. */
    95111#endif
     
    99115
    100116
    101117FUNC_START(longjmp)
    102 #ifdef __ALTIVEC__
    103         addi    3,3,15          # align Altivec to 16 byte boundary
     118      mfmsr   4
     119      rlwinm. 4,4,0,6,6       # check MSR_VE
     120      addi    3,3,7
     121      rlwinm  3,3,0,0,28  # align to 8 byte boundary
     122      beq             1f
     123    addi      3,3,15          # VE is enabled; align to 16 byte bdry
    104124        rlwinm  3,3,0,0,27
    105 #else
    106         addi    3,3,7           # align to 8 byte boundary
    107         rlwinm  3,3,0,0,28
    108 #endif
     1251:
    109126        lwz     1,0(3)          # offset 0
    110127        lwzu    2,4(3)          # offset 4
    111128        lwzu    13,4(3)         # offset 8
     
    129146        lwzu    31,4(3)         # offset 80
    130147        lwzu    5,4(3)          # offset 84
    131148        mtlr    5
     149#if !defined(_SOFT_FLOAT)
     150      mfmsr   5
     151      rlwinm. 5,5,0,18,18 # is MSR_FP set?
     152#endif
    132153        lwzu    5,4(3)          # offset 88
    133         mtcrf   255,5
    134154                                # one word pad to get floating point aligned on 8 byte boundary
    135155#ifndef _SOFT_FLOAT
     156      bne             1f
     157      addi    3,3,18*8                # skip FPregs
     158      b               2f
     1591:
    136160        lfdu    14,8(3)         # offset 96
    137161        lfdu    15,8(3)         # offset 104
    138162        lfdu    16,8(3)         # offset 112
     
    151175        lfdu    29,8(3)         # offset 216
    152176        lfdu    30,8(3)         # offset 224
    153177        lfdu    31,8(3)         # offset 232
     1782:
    154179#endif
     180      mtcrf   255,5
    155181
    156 #ifdef __ALTIVEC__
     182#if defined(__ALTIVEC__)
     183      mfmsr   5
     184      rlwinm. 5,5,0,6,6       # is MSR_FP set?
     185      bne             1f
     186      addi    3,3,(8+12*16)   # skip vector regs
     187      b               2f
     1881:
    157189        /* restore Altivec vrsave and v20-v31 registers */
    158190        lwzu    5,16(3)         # offset 248
    159191        mtspr   256,5           # vrsave
     
    181213        lvx     30,0,3          # offset 416
    182214        addi    3,3,16
    183215        lvx     31,0,3          # offset 432
     2162:
    184217#endif
    185218
    186219        mr.     3,4
  • newlib/libc/sys/rtems/machine/stdint.h

    diff -Naur newlib-1.15.0.orig/newlib/libc/sys/rtems/machine/stdint.h newlib-1.15.0/newlib/libc/sys/rtems/machine/stdint.h
    old new  
     1/*
     2 *
     3 */
     4#ifndef _MACHINE_STDINT_H
     5#define _MACHINE_STDINT_H
     6
     7#ifndef _STDINT_H
     8#error machine/stdint.h is an internal file and  must not be directly included
     9#endif
     10
     11#if defined(__sparc__) \
     12  || defined(__powerpc__) || defined(__PPC__) \
     13  || defined(__mips__) \
     14  || defined(__sh__) \
     15  || defined(__AVR__) \
     16  || defined(_C4x) || defined(_C3x) \
     17  || defined(__H8300__)
     18/* PTRDIFF_TYPE = int */
     19#define __ptrint_t_int_defined 1
     20#endif
     21
     22#if defined(__i386__) \
     23  || defined(__m68k__) \
     24  || defined(__bfin__) \
     25  || defined(__arm__) \
     26  || defined(__H8300S__) || defined(__H8300H__)
     27/* PTRDIFF_TYPE = long */
     28#define __ptrint_t_long_defined 1
     29#endif
     30
     31#endif
  • newlib/libc/sys/rtems/sys/param.h

    diff -Naur newlib-1.15.0.orig/newlib/libc/sys/rtems/sys/param.h newlib-1.15.0/newlib/libc/sys/rtems/sys/param.h
    old new  
    9393#include <sys/resource.h>
    9494#include <sys/ucred.h>
    9595#include <sys/uio.h>
    96 #include <sys/rtprio.h>
    9796
    9897#ifndef FALSE
    9998#define FALSE   0
  • newlib/Makefile.am

    diff -Naur newlib-1.15.0.orig/newlib/Makefile.am newlib-1.15.0/newlib/Makefile.am
    old new  
    8181        libc.a
    8282endif
    8383
    84 noinst_DATA = stmp-targ-include
     84BUILT_SOURCES = stmp-targ-include
    8585
    8686toollib_DATA = $(CRT0) $(CRT1)
    8787
     
    186186
    187187$(CRT1_DIR)$(CRT1): ; @true
    188188
    189 
    190 all-recursive: stmp-targ-include
    191 
    192189# The targ-include directory just holds the includes files for the
    193190# particular system and machine we have been configured for.  It is
    194191# used while building.
  • newlib/Makefile.in

    diff -Naur newlib-1.15.0.orig/newlib/Makefile.in newlib-1.15.0/newlib/Makefile.in
    old new  
    103103        pdf-recursive ps-recursive uninstall-info-recursive \
    104104        uninstall-recursive
    105105toollibDATA_INSTALL = $(INSTALL_DATA)
    106 DATA = $(noinst_DATA) $(toollib_DATA)
     106DATA = $(toollib_DATA)
    107107ETAGS = etags
    108108CTAGS = ctags
    109109DEJATOOL = $(PACKAGE)
     
    205205USE_LIBTOOL_FALSE = @USE_LIBTOOL_FALSE@
    206206USE_LIBTOOL_TRUE = @USE_LIBTOOL_TRUE@
    207207VERSION = @VERSION@
    208 ac_ct_AR = @ac_ct_AR@
    209 ac_ct_AS = @ac_ct_AS@
    210208ac_ct_CC = @ac_ct_CC@
    211 ac_ct_RANLIB = @ac_ct_RANLIB@
    212 ac_ct_READELF = @ac_ct_READELF@
    213 ac_ct_STRIP = @ac_ct_STRIP@
    214209aext = @aext@
    215210am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
    216211am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
     
    226221build_os = @build_os@
    227222build_vendor = @build_vendor@
    228223datadir = @datadir@
     224datarootdir = @datarootdir@
     225docdir = @docdir@
     226dvidir = @dvidir@
    229227exec_prefix = @exec_prefix@
    230228host = @host@
    231229host_alias = @host_alias@
    232230host_cpu = @host_cpu@
    233231host_os = @host_os@
    234232host_vendor = @host_vendor@
     233htmldir = @htmldir@
    235234includedir = @includedir@
    236235infodir = @infodir@
    237236install_sh = @install_sh@
     
    240239libdir = @libdir@
    241240libexecdir = @libexecdir@
    242241libm_machine_dir = @libm_machine_dir@
     242localedir = @localedir@
    243243localstatedir = @localstatedir@
    244244lpfx = @lpfx@
    245245machine_dir = @machine_dir@
     
    248248newlib_basedir = @newlib_basedir@
    249249oext = @oext@
    250250oldincludedir = @oldincludedir@
     251pdfdir = @pdfdir@
    251252prefix = @prefix@
    252253program_transform_name = @program_transform_name@
     254psdir = @psdir@
    253255sbindir = @sbindir@
    254256sharedstatedir = @sharedstatedir@
    255257subdirs = @subdirs@
     
    323325@USE_LIBTOOL_FALSE@toollib_LIBRARIES = libm.a \
    324326@USE_LIBTOOL_FALSE@     libc.a
    325327
    326 noinst_DATA = stmp-targ-include
     328BUILT_SOURCES = stmp-targ-include
    327329toollib_DATA = $(CRT0) $(CRT1)
    328330
    329331# The functions ldexp, frexp and modf are traditionally supplied in
     
    382384
    383385# dejagnu support
    384386RUNTESTFLAGS =
    385 all: newlib.h
     387all: $(BUILT_SOURCES) newlib.h
    386388        $(MAKE) $(AM_MAKEFLAGS) all-recursive
    387389
    388390.SUFFIXES:
     
    687689        done
    688690check-am:
    689691        $(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU
    690 check: check-recursive
     692check: $(BUILT_SOURCES)
     693        $(MAKE) $(AM_MAKEFLAGS) check-recursive
    691694all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) $(DATA) newlib.h
    692695installdirs: installdirs-recursive
    693696installdirs-am:
    694697        for dir in "$(DESTDIR)$(toollibdir)" "$(DESTDIR)$(toollibdir)" "$(DESTDIR)$(toollibdir)"; do \
    695698          test -z "$$dir" || $(mkdir_p) "$$dir"; \
    696699        done
    697 install: install-recursive
     700install: $(BUILT_SOURCES)
     701        $(MAKE) $(AM_MAKEFLAGS) install-recursive
    698702install-exec: install-exec-recursive
    699703install-data: install-data-recursive
    700704uninstall: uninstall-recursive
     
    719723maintainer-clean-generic:
    720724        @echo "This command is intended for maintainers to use"
    721725        @echo "it deletes files that may require special tools to rebuild."
     726        -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
    722727clean: clean-recursive
    723728
    724729clean-am: clean-generic clean-libtool clean-toollibLIBRARIES \
     
    837842
    838843$(CRT1_DIR)$(CRT1): ; @true
    839844
    840 all-recursive: stmp-targ-include
    841 
    842845# The targ-include directory just holds the includes files for the
    843846# particular system and machine we have been configured for.  It is
    844847# used while building.
Note: See TracBrowser for help on using the repository browser.