musl/include/errno.h
Rich Felker cbf35978a9 use __attribute__((const)) for errno and pthread_self if __GNUC__ is defined
this is not too ugly and should result in significant code size and
performance improvements for many programs.
2011-06-06 20:12:42 -04:00

22 lines
256 B
C

#ifndef _ERRNO_H
#define _ERRNO_H
#ifdef __cplusplus
extern "C" {
#endif
#include <bits/errno.h>
#ifdef __GNUC__
__attribute__((const))
#endif
extern int *__errno_location(void);
#define errno (*__errno_location())
#ifdef __cplusplus
}
#endif
#endif