About _gnu_source macros

Source: Internet
Author: User

is a functional test macro for feature Control in Features.h

/user/include/features.h

/* If _gnu_source is defined by the user, turn on all the other features. */

#ifdef _gnu_source

# undef _isoc99_source

# define _isoc99_source 1

# undef _posix_source

# define _posix_source 1

# undef _posix_c_source

# define _posix_c_source 200809L

# undef _xopen_source

# define _xopen_source 700

# undef _xopen_source_extended

# define _xopen_source_extended 1

# undef _largefile64_source

# define _largefile64_source 1

# undef _bsd_source

# define _bsd_source 1

# undef _svid_source

# define _svid_source 1

# undef _atfile_source

# define _atfile_source 1

#endif

which _isoc99_source,? _posix_source,huh? _xopen_source are functional test macros,

An attribute that indicates whether a corresponding standard is included.

these different characteristics stem from the various standardized work that has been done over the years (ANSI,? ISO,? POSIX,huh? FIPS , etc.),

Different standard support implements different features,

such as the acquisition of system time,the stat structure is not supported in the ANSI Standard,

The definition of _gnu_source is equivalent to opening up support for all features.

About _gnu_source macros

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.