Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  1. #include <reent.h>
  2.  
  3. /* Note that there is a copy of this in sys/reent.h.  */
  4. #ifndef __ATTRIBUTE_IMPURE_PTR__
  5. #define __ATTRIBUTE_IMPURE_PTR__
  6. #endif
  7.  
  8. #ifndef __ATTRIBUTE_IMPURE_DATA__
  9. #define __ATTRIBUTE_IMPURE_DATA__
  10. #endif
  11.  
  12. /* Redeclare these symbols locally as weak so that the file containing
  13.    their definitions (along with a lot of other stuff) isn't sucked in
  14.    unless they are actually used by other compilation units.  This is
  15.    important to reduce image size for targets with very small amounts
  16.    of memory.  */
  17. #ifdef _REENT_SMALL
  18. extern const struct __sFILE_fake __sf_fake_stdin _ATTRIBUTE ((weak));
  19. extern const struct __sFILE_fake __sf_fake_stdout _ATTRIBUTE ((weak));
  20. extern const struct __sFILE_fake __sf_fake_stderr _ATTRIBUTE ((weak));
  21. #endif
  22.  
  23. static struct _reent __ATTRIBUTE_IMPURE_DATA__ impure_data = _REENT_INIT (impure_data);
  24. #ifdef __CYGWIN__
  25. extern struct _reent reent_data __attribute__ ((alias("impure_data")));
  26. #endif
  27. struct _reent *__ATTRIBUTE_IMPURE_PTR__ _impure_ptr = &impure_data;
  28. struct _reent *_CONST __ATTRIBUTE_IMPURE_PTR__ _global_impure_ptr = &impure_data;
  29.