Changeset 3714


Ignore:
Timestamp:
Mar 17, 2011, 6:04:48 PM (14 years ago)
Author:
bird
Message:

0.6: Backported r3712 & r3713: stdio.h,features.h: Don't use gcc's 'extern inline' feature with 4.3.0 and later. Fixes #222.

Location:
branches/libc-0.6/src/emx/include
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/libc-0.6/src/emx/include/features.h

    r2288 r3714  
    368368
    369369/* Decide whether we can define 'extern inline' functions in headers.  */
    370 #if __GNUC_PREREQ (2, 7) && defined __OPTIMIZE__ \
     370#if __GNUC_PREREQ (2, 7) && !__GNUC_PREREQ (4, 3) && defined __OPTIMIZE__ \
    371371    && !defined __OPTIMIZE_SIZE__ && !defined __NO_INLINE__
    372372# define __USE_EXTERN_INLINES   1
  • branches/libc-0.6/src/emx/include/stdio.h

    r2777 r3714  
    465465#define __sgetc(p) (--(p)->_r < 0 ? __srget(p) : (int)(*(p)->_p++))
    466466#if defined(__GNUC__) && defined(__STDC__)
    467 static __inline int __sputc(int _c, FILE *_p) {
     467static __inline__ int __sputc(int _c, FILE *_p) {
    468468        if (--_p->_w >= 0 || (_p->_w >= _p->_lbfsize && (char)_c != '\n'))
    469469                return (*_p->_p++ = _c);
     
    527527int _rmtmp (void);
    528528
     529#include <features.h>
     530#ifdef __USE_EXTERN_INLINES
     531
    529532extern __inline__ int feof (FILE *_s)
    530533{
     
    539542extern __inline__ int getchar (void) { return getc (stdin); }
    540543extern __inline__ int putchar (int _c) { return putc (_c, stdout); }
     544
     545#endif /* __USE_EXTERN_INLINES */
    541546
    542547#if !defined (__STRICT_ANSI__) && !defined (_POSIX_SOURCE) || defined(__USE_EMX)
Note: See TracChangeset for help on using the changeset viewer.