mirror of
https://github.com/fluencelabs/musl
synced 2025-04-24 23:02:14 +00:00
default features: make musl usable without feature test macros
the old behavior of exposing nothing except plain ISO C can be obtained by defining __STRICT_ANSI__ or using a compiler option (such as -std=c99) that predefines it. the new default featureset is POSIX with XSI plus _BSD_SOURCE. any explicit feature test macros will inhibit the default. installation docs have also been updated to reflect this change.
This commit is contained in:
parent
9f65796c35
commit
c1a9658bd1
15
INSTALL
15
INSTALL
@ -76,14 +76,9 @@ musl-gcc hello.c
|
|||||||
./a.out
|
./a.out
|
||||||
|
|
||||||
To configure autoconf-based program to compile and link against musl,
|
To configure autoconf-based program to compile and link against musl,
|
||||||
you may wish to use:
|
set the CC variable to musl-gcc when running configure, as in:
|
||||||
|
|
||||||
CC="musl-gcc -D_GNU_SOURCE" ./configure ...
|
CC=musl-gcc ./configure ...
|
||||||
|
|
||||||
Correctly-written build systems should not need -D_GNU_SOURCE as part
|
|
||||||
of $CC, but many programs do not use feature-test macros correctly and
|
|
||||||
simply assume the compiler will automatically give them the kitchen
|
|
||||||
sink, so the above command is an easy workaround.
|
|
||||||
|
|
||||||
You will probably also want to use --prefix when building libraries to
|
You will probably also want to use --prefix when building libraries to
|
||||||
ensure that they are installed under the musl prefix and not in the
|
ensure that they are installed under the musl prefix and not in the
|
||||||
@ -140,9 +135,3 @@ dynamic linker (program interpreter) is /lib/ld-musl-$ARCH.so.1. If
|
|||||||
you're using static linking only, you might instead check the symbols
|
you're using static linking only, you might instead check the symbols
|
||||||
and look for anything suspicious that would indicate your old glibc or
|
and look for anything suspicious that would indicate your old glibc or
|
||||||
uClibc was used.
|
uClibc was used.
|
||||||
|
|
||||||
When building programs against musl, you may still want to ensure the
|
|
||||||
appropriate feature test macros get defined, as in:
|
|
||||||
|
|
||||||
CC="gcc -D_GNU_SOURCE" ./configure ...
|
|
||||||
|
|
||||||
|
@ -5,12 +5,7 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if __STDC_VERSION__ >= 199901L
|
#include <features.h>
|
||||||
#define __restrict restrict
|
|
||||||
#elif !defined(__GNUC__)
|
|
||||||
#define __restrict
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
|
@ -1,11 +1,6 @@
|
|||||||
#undef assert
|
#include <features.h>
|
||||||
|
|
||||||
#if __STDC_VERSION__ >= 201112L
|
#undef assert
|
||||||
#elif defined(__GNUC__)
|
|
||||||
#define _Noreturn __attribute__((__noreturn__))
|
|
||||||
#else
|
|
||||||
#define _Noreturn
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef NDEBUG
|
#ifdef NDEBUG
|
||||||
#define assert(x) (void)0
|
#define assert(x) (void)0
|
||||||
|
@ -5,6 +5,8 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <features.h>
|
||||||
|
|
||||||
int isalnum(int);
|
int isalnum(int);
|
||||||
int isalpha(int);
|
int isalpha(int);
|
||||||
int isblank(int);
|
int isblank(int);
|
||||||
|
@ -5,11 +5,7 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if __STDC_VERSION__ >= 199901L
|
#include <features.h>
|
||||||
#define __restrict restrict
|
|
||||||
#elif !defined(__GNUC__)
|
|
||||||
#define __restrict
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define __NEED_ino_t
|
#define __NEED_ino_t
|
||||||
#define __NEED_off_t
|
#define __NEED_off_t
|
||||||
|
@ -5,11 +5,7 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if __STDC_VERSION__ >= 199901L
|
#include <features.h>
|
||||||
#define __restrict restrict
|
|
||||||
#elif !defined(__GNUC__)
|
|
||||||
#define __restrict
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define RTLD_LAZY 1
|
#define RTLD_LAZY 1
|
||||||
#define RTLD_NOW 2
|
#define RTLD_NOW 2
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
#ifndef _ENDIAN_H
|
#ifndef _ENDIAN_H
|
||||||
#define _ENDIAN_H
|
#define _ENDIAN_H
|
||||||
|
|
||||||
#if __STDC_VERSION__ >= 199901L || defined(__cplusplus)
|
#include <features.h>
|
||||||
#define __inline inline
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define __LITTLE_ENDIAN 1234
|
#define __LITTLE_ENDIAN 1234
|
||||||
#define __BIG_ENDIAN 4321
|
#define __BIG_ENDIAN 4321
|
||||||
|
@ -5,6 +5,8 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <features.h>
|
||||||
|
|
||||||
#define __NEED_off_t
|
#define __NEED_off_t
|
||||||
#define __NEED_pid_t
|
#define __NEED_pid_t
|
||||||
#define __NEED_mode_t
|
#define __NEED_mode_t
|
||||||
|
@ -1 +1,28 @@
|
|||||||
#warning "features.h is bogus"
|
#ifndef _FEATURES_H
|
||||||
|
#define _FEATURES_H
|
||||||
|
|
||||||
|
#if !defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE) \
|
||||||
|
&& !defined(_XOPEN_SOURCE) && !defined(_GNU_SOURCE) \
|
||||||
|
&& !defined(_BSD_SOURCE) && !defined(__STRICT_ANSI__)
|
||||||
|
#define _BSD_SOURCE 1
|
||||||
|
#define _XOPEN_SOURCE 700
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if __STDC_VERSION__ >= 199901L
|
||||||
|
#define __restrict restrict
|
||||||
|
#elif !defined(__GNUC__)
|
||||||
|
#define __restrict
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if __STDC_VERSION__ >= 199901L || defined(__cplusplus)
|
||||||
|
#define __inline inline
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if __STDC_VERSION__ >= 201112L
|
||||||
|
#elif defined(__GNUC__)
|
||||||
|
#define _Noreturn __attribute__((__noreturn__))
|
||||||
|
#else
|
||||||
|
#define _Noreturn
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
@ -5,6 +5,8 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <features.h>
|
||||||
|
|
||||||
#define FNM_PATHNAME 0x1
|
#define FNM_PATHNAME 0x1
|
||||||
#define FNM_NOESCAPE 0x2
|
#define FNM_NOESCAPE 0x2
|
||||||
#define FNM_PERIOD 0x4
|
#define FNM_PERIOD 0x4
|
||||||
|
@ -5,6 +5,8 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <features.h>
|
||||||
|
|
||||||
/* Normally we do not nest header includes. However useless bloat
|
/* Normally we do not nest header includes. However useless bloat
|
||||||
* like ftw may be treated as a special case. Otherwise we would
|
* like ftw may be treated as a special case. Otherwise we would
|
||||||
* have to deal with duplicating all the stat.h mess. */
|
* have to deal with duplicating all the stat.h mess. */
|
||||||
|
@ -5,11 +5,7 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if __STDC_VERSION__ >= 199901L
|
#include <features.h>
|
||||||
#define __restrict restrict
|
|
||||||
#elif !defined(__GNUC__)
|
|
||||||
#define __restrict
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define __NEED_size_t
|
#define __NEED_size_t
|
||||||
|
|
||||||
|
@ -5,6 +5,8 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <features.h>
|
||||||
|
|
||||||
#define __NEED_size_t
|
#define __NEED_size_t
|
||||||
#define __NEED_gid_t
|
#define __NEED_gid_t
|
||||||
|
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
#ifndef _LIMITS_H
|
#ifndef _LIMITS_H
|
||||||
#define _LIMITS_H
|
#define _LIMITS_H
|
||||||
|
|
||||||
|
#include <features.h>
|
||||||
|
|
||||||
/* Most limits are system-specific */
|
/* Most limits are system-specific */
|
||||||
|
|
||||||
#include <bits/limits.h>
|
#include <bits/limits.h>
|
||||||
|
@ -5,6 +5,8 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <features.h>
|
||||||
|
|
||||||
#undef NULL
|
#undef NULL
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
#define NULL 0
|
#define NULL 0
|
||||||
|
@ -5,9 +5,7 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if __STDC_VERSION__ >= 199901L || defined(__cplusplus)
|
#include <features.h>
|
||||||
#define __inline inline
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define __NEED_float_t
|
#define __NEED_float_t
|
||||||
#define __NEED_double_t
|
#define __NEED_double_t
|
||||||
|
@ -5,6 +5,8 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <features.h>
|
||||||
|
|
||||||
#define IF_NAMESIZE 16
|
#define IF_NAMESIZE 16
|
||||||
|
|
||||||
struct if_nameindex
|
struct if_nameindex
|
||||||
|
@ -5,11 +5,7 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if __STDC_VERSION__ >= 199901L
|
#include <features.h>
|
||||||
#define __restrict restrict
|
|
||||||
#elif !defined(__GNUC__)
|
|
||||||
#define __restrict
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
|
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
|
||||||
#define __NEED_size_t
|
#define __NEED_size_t
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
#ifndef _NETINET_TCP_H
|
#ifndef _NETINET_TCP_H
|
||||||
#define _NETINET_TCP_H
|
#define _NETINET_TCP_H
|
||||||
|
|
||||||
|
#include <features.h>
|
||||||
|
|
||||||
#define TCP_NODELAY 1
|
#define TCP_NODELAY 1
|
||||||
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
|
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
@ -5,6 +5,8 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <features.h>
|
||||||
|
|
||||||
#define __NEED_size_t
|
#define __NEED_size_t
|
||||||
#define __NEED_uid_t
|
#define __NEED_uid_t
|
||||||
#define __NEED_gid_t
|
#define __NEED_gid_t
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <features.h>
|
||||||
|
|
||||||
#define __NEED_struct_timespec
|
#define __NEED_struct_timespec
|
||||||
#define __NEED_pid_t
|
#define __NEED_pid_t
|
||||||
#define __NEED_time_t
|
#define __NEED_time_t
|
||||||
|
@ -5,12 +5,7 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if __STDC_VERSION__ >= 199901L
|
#include <features.h>
|
||||||
#define __restrict restrict
|
|
||||||
#elif !defined(__GNUC__)
|
|
||||||
#define __restrict
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#define __NEED_size_t
|
#define __NEED_size_t
|
||||||
#include <bits/alltypes.h>
|
#include <bits/alltypes.h>
|
||||||
|
@ -5,12 +5,7 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if __STDC_VERSION__ >= 201112L
|
#include <features.h>
|
||||||
#elif defined(__GNUC__)
|
|
||||||
#define _Noreturn __attribute__((__noreturn__))
|
|
||||||
#else
|
|
||||||
#define _Noreturn
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <bits/setjmp.h>
|
#include <bits/setjmp.h>
|
||||||
|
|
||||||
|
@ -5,11 +5,7 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if __STDC_VERSION__ >= 199901L
|
#include <features.h>
|
||||||
#define __restrict restrict
|
|
||||||
#elif !defined(__GNUC__)
|
|
||||||
#define __restrict
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
|
#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
|
||||||
|| defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \
|
|| defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \
|
||||||
|
@ -5,11 +5,7 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if __STDC_VERSION__ >= 199901L
|
#include <features.h>
|
||||||
#define __restrict restrict
|
|
||||||
#elif !defined(__GNUC__)
|
|
||||||
#define __restrict
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define __NEED_FILE
|
#define __NEED_FILE
|
||||||
#define __NEED_va_list
|
#define __NEED_va_list
|
||||||
|
@ -5,18 +5,7 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if __STDC_VERSION__ >= 199901L
|
#include <features.h>
|
||||||
#define __restrict restrict
|
|
||||||
#elif !defined(__GNUC__)
|
|
||||||
#define __restrict
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if __STDC_VERSION__ >= 201112L
|
|
||||||
#elif defined(__GNUC__)
|
|
||||||
#define _Noreturn __attribute__((__noreturn__))
|
|
||||||
#else
|
|
||||||
#define _Noreturn
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#undef NULL
|
#undef NULL
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
@ -5,11 +5,7 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if __STDC_VERSION__ >= 199901L
|
#include <features.h>
|
||||||
#define __restrict restrict
|
|
||||||
#elif !defined(__GNUC__)
|
|
||||||
#define __restrict
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#undef NULL
|
#undef NULL
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <features.h>
|
||||||
|
|
||||||
#define __NEED_uid_t
|
#define __NEED_uid_t
|
||||||
#define __NEED_gid_t
|
#define __NEED_gid_t
|
||||||
#define __NEED_mode_t
|
#define __NEED_mode_t
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <features.h>
|
||||||
|
|
||||||
#define __NEED_mode_t
|
#define __NEED_mode_t
|
||||||
#define __NEED_size_t
|
#define __NEED_size_t
|
||||||
#define __NEED_off_t
|
#define __NEED_off_t
|
||||||
|
@ -5,6 +5,8 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <features.h>
|
||||||
|
|
||||||
#define __NEED_id_t
|
#define __NEED_id_t
|
||||||
#define __NEED_time_t
|
#define __NEED_time_t
|
||||||
#define __NEED_struct_timeval
|
#define __NEED_struct_timeval
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <features.h>
|
||||||
|
|
||||||
#define __NEED_size_t
|
#define __NEED_size_t
|
||||||
#define __NEED_pid_t
|
#define __NEED_pid_t
|
||||||
#define __NEED_time_t
|
#define __NEED_time_t
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <features.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
ssize_t sendfile(int, int, off_t *, size_t);
|
ssize_t sendfile(int, int, off_t *, size_t);
|
||||||
|
@ -5,6 +5,8 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <features.h>
|
||||||
|
|
||||||
#define __NEED_time_t
|
#define __NEED_time_t
|
||||||
#define __NEED_size_t
|
#define __NEED_size_t
|
||||||
#define __NEED_pid_t
|
#define __NEED_pid_t
|
||||||
|
@ -4,11 +4,7 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if __STDC_VERSION__ >= 199901L
|
#include <features.h>
|
||||||
#define __restrict restrict
|
|
||||||
#elif !defined(__GNUC__)
|
|
||||||
#define __restrict
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define __NEED_dev_t
|
#define __NEED_dev_t
|
||||||
#define __NEED_ino_t
|
#define __NEED_ino_t
|
||||||
|
@ -5,6 +5,8 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <features.h>
|
||||||
|
|
||||||
#include <sys/statvfs.h>
|
#include <sys/statvfs.h>
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
@ -5,11 +5,7 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if __STDC_VERSION__ >= 199901L
|
#include <features.h>
|
||||||
#define __restrict restrict
|
|
||||||
#elif !defined(__GNUC__)
|
|
||||||
#define __restrict
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define __NEED_fsblkcnt_t
|
#define __NEED_fsblkcnt_t
|
||||||
#define __NEED_fsfilcnt_t
|
#define __NEED_fsfilcnt_t
|
||||||
|
@ -4,11 +4,7 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if __STDC_VERSION__ >= 199901L
|
#include <features.h>
|
||||||
#define __restrict restrict
|
|
||||||
#elif !defined(__GNUC__)
|
|
||||||
#define __restrict
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <sys/select.h>
|
#include <sys/select.h>
|
||||||
|
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <features.h>
|
||||||
|
|
||||||
#define __NEED_ino_t
|
#define __NEED_ino_t
|
||||||
#define __NEED_dev_t
|
#define __NEED_dev_t
|
||||||
#define __NEED_uid_t
|
#define __NEED_uid_t
|
||||||
|
@ -5,6 +5,8 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <features.h>
|
||||||
|
|
||||||
#define __NEED_size_t
|
#define __NEED_size_t
|
||||||
#define __NEED_ssize_t
|
#define __NEED_ssize_t
|
||||||
#define __NEED_struct_iovec
|
#define __NEED_struct_iovec
|
||||||
|
@ -5,6 +5,8 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <features.h>
|
||||||
|
|
||||||
struct utsname
|
struct utsname
|
||||||
{
|
{
|
||||||
char sysname[65];
|
char sysname[65];
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <features.h>
|
||||||
|
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
|
||||||
#define __NEED_pid_t
|
#define __NEED_pid_t
|
||||||
|
@ -5,6 +5,8 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <features.h>
|
||||||
|
|
||||||
#define LOG_EMERG 0
|
#define LOG_EMERG 0
|
||||||
#define LOG_ALERT 1
|
#define LOG_ALERT 1
|
||||||
#define LOG_CRIT 2
|
#define LOG_CRIT 2
|
||||||
|
@ -5,6 +5,8 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <features.h>
|
||||||
|
|
||||||
#define __NEED_pid_t
|
#define __NEED_pid_t
|
||||||
|
|
||||||
#include <bits/alltypes.h>
|
#include <bits/alltypes.h>
|
||||||
|
@ -5,11 +5,7 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if __STDC_VERSION__ >= 199901L
|
#include <features.h>
|
||||||
#define __restrict restrict
|
|
||||||
#elif !defined(__GNUC__)
|
|
||||||
#define __restrict
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#undef NULL
|
#undef NULL
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <features.h>
|
||||||
|
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
|
||||||
#ifdef _GNU_SOURCE
|
#ifdef _GNU_SOURCE
|
||||||
|
@ -5,18 +5,7 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if __STDC_VERSION__ >= 199901L
|
#include <features.h>
|
||||||
#define __restrict restrict
|
|
||||||
#elif !defined(__GNUC__)
|
|
||||||
#define __restrict
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if __STDC_VERSION__ >= 201112L
|
|
||||||
#elif defined(__GNUC__)
|
|
||||||
#define _Noreturn __attribute__((__noreturn__))
|
|
||||||
#else
|
|
||||||
#define _Noreturn
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define STDIN_FILENO 0
|
#define STDIN_FILENO 0
|
||||||
#define STDOUT_FILENO 1
|
#define STDOUT_FILENO 1
|
||||||
|
@ -5,11 +5,7 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if __STDC_VERSION__ >= 199901L
|
#include <features.h>
|
||||||
#define __restrict restrict
|
|
||||||
#elif !defined(__GNUC__)
|
|
||||||
#define __restrict
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define __NEED_FILE
|
#define __NEED_FILE
|
||||||
#define __NEED_va_list
|
#define __NEED_va_list
|
||||||
|
@ -5,6 +5,8 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <features.h>
|
||||||
|
|
||||||
#define __NEED_wint_t
|
#define __NEED_wint_t
|
||||||
#define __NEED_wctrans_t
|
#define __NEED_wctrans_t
|
||||||
#define __NEED_wctype_t
|
#define __NEED_wctype_t
|
||||||
|
Loading…
x
Reference in New Issue
Block a user