mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2024-12-16 03:42:35 +03:00
754f9336f0
git-svn-id: svn://kolibrios.org@4349 a494cfbc-eb01-0410-851d-a64ba20cac60
29 lines
1.1 KiB
C
29 lines
1.1 KiB
C
#include <reent.h>
|
|
|
|
/* Note that there is a copy of this in sys/reent.h. */
|
|
#ifndef __ATTRIBUTE_IMPURE_PTR__
|
|
#define __ATTRIBUTE_IMPURE_PTR__
|
|
#endif
|
|
|
|
#ifndef __ATTRIBUTE_IMPURE_DATA__
|
|
#define __ATTRIBUTE_IMPURE_DATA__
|
|
#endif
|
|
|
|
/* Redeclare these symbols locally as weak so that the file containing
|
|
their definitions (along with a lot of other stuff) isn't sucked in
|
|
unless they are actually used by other compilation units. This is
|
|
important to reduce image size for targets with very small amounts
|
|
of memory. */
|
|
#ifdef _REENT_SMALL
|
|
extern const struct __sFILE_fake __sf_fake_stdin _ATTRIBUTE ((weak));
|
|
extern const struct __sFILE_fake __sf_fake_stdout _ATTRIBUTE ((weak));
|
|
extern const struct __sFILE_fake __sf_fake_stderr _ATTRIBUTE ((weak));
|
|
#endif
|
|
|
|
static struct _reent __ATTRIBUTE_IMPURE_DATA__ impure_data = _REENT_INIT (impure_data);
|
|
#ifdef __CYGWIN__
|
|
extern struct _reent reent_data __attribute__ ((alias("impure_data")));
|
|
#endif
|
|
struct _reent *__ATTRIBUTE_IMPURE_PTR__ _impure_ptr = &impure_data;
|
|
struct _reent *_CONST __ATTRIBUTE_IMPURE_PTR__ _global_impure_ptr = &impure_data;
|