summaryrefslogtreecommitdiff
path: root/libc/include/reent.h
blob: ddd19d3dbc0fb3d39f37957c8fecc9ad85504e0b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#ifndef __RENT_H__
#define __RENT_H__

#include <errno.h>

struct _reent {
    enum errno_t _errno;
};

static inline void _REENT_INIT_PTR(struct _reent * reent) { reent->_errno = ENOERROR; }
extern struct _reent * _impure_ptr;
static inline void set_errno(enum errno_t _errno) { _impure_ptr->_errno = errno = _errno; }

#endif