# SOME DESCRIPTIVE TITLE # Copyright (C) YEAR Free Software Foundation, Inc. # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "POT-Creation-Date: 2024-06-01 05:49+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. type: TH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "feature_test_macros" msgstr "" #. type: TH #: archlinux debian-unstable opensuse-tumbleweed #, no-wrap msgid "2024-05-02" msgstr "" #. type: TH #: archlinux debian-unstable #, no-wrap msgid "Linux man-pages 6.8" msgstr "" #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "NAME" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "feature_test_macros - feature test macros" msgstr "" #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "DESCRIPTION" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Feature test macros allow the programmer to control the definitions that are " "exposed by system header files when a program is compiled." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "B In order to be effective, a feature test macro I. This can be done either in the " "compilation command (I) or by defining the macro within " "the source code before including any headers. The requirement that the " "macro must be defined before including any header file exists because header " "files may freely include one another. Thus, for example, in the following " "lines, defining the B<_GNU_SOURCE> macro may have no effect because the " "header Iabc.hE> itself includes Ixyz.hE> (POSIX " "explicitly allows this):" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "" "#include Eabc.hE\n" "#define _GNU_SOURCE\n" "#include Exyz.hE\n" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Some feature test macros are useful for creating portable applications, by " "preventing nonstandard definitions from being exposed. Other macros can be " "used to expose nonstandard definitions that are not exposed by default." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The precise effects of each of the feature test macros described below can " "be ascertained by inspecting the Ifeatures.hE> header file. " "B: applications do I need to directly include Ifeatures." "hE>; indeed, doing so is actively discouraged. See NOTES." msgstr "" #. type: SS #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "Specification of feature test macro requirements in manual pages" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "When a function requires that a feature test macro is defined, the manual " "page SYNOPSIS typically includes a note of the following form (this example " "from the B(2) manual page):" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "B<#include Eunistd.hE>" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "BIB<);>" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "" "Feature Test Macro Requirements for glibc (see\n" "B(7)):\n" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "B(): _BSD_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE E 500)" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The B<||> means that in order to obtain the declaration of B(2) from " "Iunistd.hE>, I of the following macro definitions must be " "made before including any header files:" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "" "#define _BSD_SOURCE\n" "#define _XOPEN_SOURCE /* or any value E 500 */\n" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Alternatively, equivalent definitions can be included in the compilation " "command:" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "" "cc -D_BSD_SOURCE\n" "cc -D_XOPEN_SOURCE # Or any value E 500\n" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Note that, as described below, B, so that it may not always be necessary to explicitly specify the " "feature test macro(s) shown in the SYNOPSIS." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "In a few cases, manual pages use a shorthand for expressing the feature test " "macro requirements (this example from B(2)):" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-tumbleweed #, no-wrap msgid "" "B<#define _GNU_SOURCE>\n" "B<#define _FILE_OFFSET_BITS 64>\n" "B<#include Efcntl.hE>\n" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-tumbleweed #, no-wrap msgid "BIB<, off_t *>IB<, size_t >IB<);>\n" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-tumbleweed msgid "" "This format is employed when the feature test macros ensure that the proper " "function declarations are visible, and the macros are not defined by default." msgstr "" #. type: SS #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "Feature test macros understood by glibc" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The paragraphs below explain how feature test macros are handled in glibc 2." "I, I E 0." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "First, though, a summary of a few details for the impatient:" msgstr "" #. type: IP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "\\[bu]" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The macros that you most likely need to use in modern source code are " "B<_POSIX_C_SOURCE> (for definitions from various versions of POSIX.1), " "B<_XOPEN_SOURCE> (for definitions from various versions of SUS), " "B<_GNU_SOURCE> (for GNU and/or Linux specific stuff), and B<_DEFAULT_SOURCE> " "(to get definitions that would normally be provided by default)." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Certain macros are defined with default values. Thus, although one or more " "macros may be indicated as being required in the SYNOPSIS of a man page, it " "may not be necessary to define them explicitly. Full details of the " "defaults are given later in this man page." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Defining B<_XOPEN_SOURCE> with a value of 600 or greater produces the same " "effects as defining B<_POSIX_C_SOURCE> with a value of 200112L or greater. " "Where one sees" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "_POSIX_C_SOURCE E= 200112L\n" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "in the feature test macro requirements in the SYNOPSIS of a man page, it is " "implicit that the following has the same effect:" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "_XOPEN_SOURCE E= 600\n" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Defining B<_XOPEN_SOURCE> with a value of 700 or greater produces the same " "effects as defining B<_POSIX_C_SOURCE> with a value of 200809L or greater. " "Where one sees" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "_POSIX_C_SOURCE E= 200809L\n" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "_XOPEN_SOURCE E= 700\n" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "glibc understands the following feature test macros:" msgstr "" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B<__STRICT_ANSI__>" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "ISO Standard C. This macro is implicitly defined by B(1) when invoked " "with, for example, the I<-std=c99> or I<-ansi> flag." msgstr "" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B<_POSIX_C_SOURCE>" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Defining this macro causes header files to expose definitions as follows:" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The value 1 exposes definitions conforming to POSIX.1-1990 and ISO C (1990)." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The value 2 or greater additionally exposes definitions for POSIX.2-1992." msgstr "" #. 199506L functionality is available only since glibc 2.1 #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The value 199309L or greater additionally exposes definitions for POSIX.1b " "(real-time extensions)." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The value 199506L or greater additionally exposes definitions for POSIX.1c " "(threads)." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "(Since glibc 2.3.3) The value 200112L or greater additionally exposes " "definitions corresponding to the POSIX.1-2001 base specification (excluding " "the XSI extension). This value also causes C95 (since glibc 2.12) and C99 " "(since glibc 2.10) features to be exposed (in other words, the equivalent of " "defining B<_ISOC99_SOURCE>)." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "(Since glibc 2.10) The value 200809L or greater additionally exposes " "definitions corresponding to the POSIX.1-2008 base specification (excluding " "the XSI extension)." msgstr "" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B<_POSIX_SOURCE>" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Defining this obsolete macro with any value is equivalent to defining " "B<_POSIX_C_SOURCE> with the value 1." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Since this macro is obsolete, its usage is generally not documented when " "discussing feature test macro requirements in the man pages." msgstr "" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B<_XOPEN_SOURCE>" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Defining with any value exposes definitions conforming to POSIX.1, POSIX.2, " "and XPG4." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The value 500 or greater additionally exposes definitions for SUSv2 (UNIX " "98)." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "(Since glibc 2.2) The value 600 or greater additionally exposes definitions " "for SUSv3 (UNIX 03; i.e., the POSIX.1-2001 base specification plus the XSI " "extension) and C99 definitions." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "(Since glibc 2.10) The value 700 or greater additionally exposes definitions " "for SUSv4 (i.e., the POSIX.1-2008 base specification plus the XSI extension)." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "If B<__STRICT_ANSI__> is not defined, or B<_XOPEN_SOURCE> is defined with a " "value greater than or equal to 500 I neither B<_POSIX_SOURCE> nor " "B<_POSIX_C_SOURCE> is explicitly defined, then the following macros are " "implicitly defined:" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "B<_POSIX_SOURCE> is defined with the value 1." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "B<_POSIX_C_SOURCE> is defined, according to the value of B<_XOPEN_SOURCE>:" msgstr "" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B<_XOPEN_SOURCE> E 500" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "B<_POSIX_C_SOURCE> is defined with the value 2." msgstr "" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "500 E= B<_XOPEN_SOURCE> E 600" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "B<_POSIX_C_SOURCE> is defined with the value 199506L." msgstr "" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "600 E= B<_XOPEN_SOURCE> E 700" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "B<_POSIX_C_SOURCE> is defined with the value 200112L." msgstr "" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "700 E= B<_XOPEN_SOURCE> (since glibc 2.10)" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "B<_POSIX_C_SOURCE> is defined with the value 200809L." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "In addition, defining B<_XOPEN_SOURCE> with a value of 500 or greater " "produces the same effects as defining B<_XOPEN_SOURCE_EXTENDED>." msgstr "" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B<_XOPEN_SOURCE_EXTENDED>" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "If this macro is defined, I B<_XOPEN_SOURCE> is defined, then expose " "definitions corresponding to the XPG4v2 (SUSv1) UNIX extensions (UNIX 95). " "Defining B<_XOPEN_SOURCE> with a value of 500 or more also produces the same " "effect as defining B<_XOPEN_SOURCE_EXTENDED>. Use of " "B<_XOPEN_SOURCE_EXTENDED> in new source code should be avoided." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Since defining B<_XOPEN_SOURCE> with a value of 500 or more has the same " "effect as defining B<_XOPEN_SOURCE_EXTENDED>, the latter (obsolete) feature " "test macro is generally not described in the SYNOPSIS in man pages." msgstr "" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B<_ISOC99_SOURCE> (since glibc 2.1.3)" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "Exposes declarations consistent with the ISO C99 standard." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Earlier glibc 2.1.x versions recognized an equivalent macro named " "B<_ISOC9X_SOURCE> (because the C99 standard had not then been finalized). " "Although the use of this macro is obsolete, glibc continues to recognize it " "for backward compatibility." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Defining B<_ISOC99_SOURCE> also exposes ISO C (1990) Amendment 1 (\"C95\") " "definitions. (The primary change in C95 was support for international " "character sets.)" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Invoking the C compiler with the option I<-std=c99> produces the same " "effects as defining this macro." msgstr "" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B<_ISOC11_SOURCE> (since glibc 2.16)" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Exposes declarations consistent with the ISO C11 standard. Defining this " "macro also enables C99 and C95 features (like B<_ISOC99_SOURCE>)." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Invoking the C compiler with the option I<-std=c11> produces the same " "effects as defining this macro." msgstr "" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B<_LARGEFILE64_SOURCE>" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Expose definitions for the alternative API specified by the LFS (Large File " "Summit) as a \"transitional extension\" to the Single UNIX Specification. " "(See E<.UR http:\\:/\\:/opengroup.org\\:/platform\\:/lfs.html> E<.UE .)> The " "alternative API consists of a set of new objects (i.e., functions and types) " "whose names are suffixed with \"64\" (e.g., I versus I, " "B() versus B(), etc.). New programs should not employ this " "macro; instead I<_FILE_OFFSET_BITS=64> should be employed." msgstr "" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B<_LARGEFILE_SOURCE>" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "This macro was historically used to expose certain functions (specifically " "B(3) and B(3)) that address limitations of earlier APIs " "(B(3) and B(3)) that use I for file offsets. This " "macro is implicitly defined if B<_XOPEN_SOURCE> is defined with a value " "greater than or equal to 500. New programs should not employ this macro; " "defining B<_XOPEN_SOURCE> as just described or defining B<_FILE_OFFSET_BITS> " "with the value 64 is the preferred mechanism to achieve the same result." msgstr "" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B<_FILE_OFFSET_BITS>" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-tumbleweed msgid "" "Defining this macro with the value 64 automatically converts references to " "32-bit functions and data types related to file I/O and filesystem " "operations into references to their 64-bit counterparts. This is useful for " "performing I/O on large files (E 2 Gigabytes) on 32-bit systems. It is " "also useful when calling functions like B(2) that were " "added more recently and that come only in 64-bit flavors. (Defining this " "macro permits correctly written programs to use large files with only a " "recompilation being required.)" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "64-bit systems naturally permit file sizes greater than 2 Gigabytes, and on " "those systems this macro has no effect." msgstr "" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B<_TIME_BITS>" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Defining this macro with the value 64 changes the width of B(3type) " "to 64-bit which allows handling of timestamps beyond 2038. It is closely " "related to B<_FILE_OFFSET_BITS> and depending on implementation, may require " "it set. This macro is available as of glibc 2.34." msgstr "" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B<_BSD_SOURCE> (deprecated since glibc 2.20)" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Defining this macro with any value causes header files to expose BSD-derived " "definitions." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "In glibc versions up to and including 2.18, defining this macro also causes " "BSD definitions to be preferred in some situations where standards conflict, " "unless one or more of B<_SVID_SOURCE>, B<_POSIX_SOURCE>, B<_POSIX_C_SOURCE>, " "B<_XOPEN_SOURCE>, B<_XOPEN_SOURCE_EXTENDED>, or B<_GNU_SOURCE> is defined, " "in which case BSD definitions are disfavored. Since glibc 2.19, " "B<_BSD_SOURCE> no longer causes BSD definitions to be preferred in case of " "conflicts." msgstr "" #. commit c941736c92fa3a319221f65f6755659b2a5e0a20 #. commit 498afc54dfee41d33ba519f496e96480badace8e #. commit acd7f096d79c181866d56d4aaf3b043e741f1e2c #. commit ade40b10ff5fa59a318cf55b9d8414b758e8df78 #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Since glibc 2.20, this macro is deprecated. It now has the same effect as " "defining B<_DEFAULT_SOURCE>, but generates a compile-time warning (unless " "B<_DEFAULT_SOURCE> is also defined). Use B<_DEFAULT_SOURCE> instead. To " "allow code that requires B<_BSD_SOURCE> in glibc 2.19 and earlier and " "B<_DEFAULT_SOURCE> in glibc 2.20 and later to compile without warnings, " "define I B<_BSD_SOURCE> and B<_DEFAULT_SOURCE>." msgstr "" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B<_SVID_SOURCE> (deprecated since glibc 2.20)" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Defining this macro with any value causes header files to expose System V-" "derived definitions. (SVID == System V Interface Definition; see " "B(7).)" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Since glibc 2.20, this macro is deprecated in the same fashion as " "B<_BSD_SOURCE>." msgstr "" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B<_DEFAULT_SOURCE> (since glibc 2.19)" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "This macro can be defined to ensure that the \"default\" definitions are " "provided even when the defaults would otherwise be disabled, as happens when " "individual macros are explicitly defined, or the compiler is invoked in one " "of its \"standard\" modes (e.g., I). Defining " "B<_DEFAULT_SOURCE> without defining other individual macros or invoking the " "compiler in one of its \"standard\" modes has no effect." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The \"default\" definitions comprise those required by POSIX.1-2008 and ISO " "C99, as well as various definitions originally derived from BSD and System " "V. On glibc 2.19 and earlier, these defaults were approximately equivalent " "to explicitly defining the following:" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "cc -D_BSD_SOURCE -D_SVID_SOURCE -D_POSIX_C_SOURCE=200809\n" msgstr "" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B<_ATFILE_SOURCE> (since glibc 2.4)" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Defining this macro with any value causes header files to expose " "declarations of a range of functions with the suffix \"at\"; see " "B(2). Since glibc 2.10, this macro is also implicitly defined if " "B<_POSIX_C_SOURCE> is defined with a value greater than or equal to 200809L." msgstr "" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B<_GNU_SOURCE>" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Defining this macro (with any value) implicitly defines B<_ATFILE_SOURCE>, " "B<_LARGEFILE64_SOURCE>, B<_ISOC99_SOURCE>, B<_XOPEN_SOURCE_EXTENDED>, " "B<_POSIX_SOURCE>, B<_POSIX_C_SOURCE> with the value 200809L (200112L before " "glibc 2.10; 199506L before glibc 2.5; 199309L before glibc 2.1) and " "B<_XOPEN_SOURCE> with the value 700 (600 before glibc 2.10; 500 before glibc " "2.2). In addition, various GNU-specific extensions are also exposed." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Since glibc 2.19, defining B<_GNU_SOURCE> also has the effect of implicitly " "defining B<_DEFAULT_SOURCE>. Before glibc 2.20, defining B<_GNU_SOURCE> " "also had the effect of implicitly defining B<_BSD_SOURCE> and " "B<_SVID_SOURCE>." msgstr "" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B<_REENTRANT>" msgstr "" #. Zack Weinberg #. There did once exist C libraries where it was necessary. The ones #. I remember were proprietary Unix vendor libcs from the mid-1990s #. You would get completely unlocked stdio without _REENTRANT. #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Historically, on various C libraries it was necessary to define this macro " "in all multithreaded code. (Some C libraries may still require this.) In " "glibc, this macro also exposed definitions of certain reentrant functions." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "However, glibc has been thread-safe by default for many years; since glibc " "2.3, the only effect of defining B<_REENTRANT> has been to enable one or two " "of the same declarations that are also enabled by defining " "B<_POSIX_C_SOURCE> with a value of 199606L or greater." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "B<_REENTRANT> is now obsolete. In glibc 2.25 and later, defining " "B<_REENTRANT> is equivalent to defining B<_POSIX_C_SOURCE> with the value " "199606L. If a higher POSIX conformance level is selected by any other means " "(such as B<_POSIX_C_SOURCE> itself, B<_XOPEN_SOURCE>, B<_DEFAULT_SOURCE>, or " "B<_GNU_SOURCE>), then defining B<_REENTRANT> has no effect." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "This macro is automatically defined if one compiles with I." msgstr "" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B<_THREAD_SAFE>" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Synonym for the (deprecated) B<_REENTRANT>, provided for compatibility with " "some other implementations." msgstr "" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B<_FORTIFY_SOURCE> (since glibc 2.3.4)" msgstr "" #. For more detail, see: #. http://gcc.gnu.org/ml/gcc-patches/2004-09/msg02055.html #. [PATCH] Object size checking to prevent (some) buffer overflows #. * From: Jakub Jelinek #. * To: gcc-patches at gcc dot gnu dot org #. * Date: Tue, 21 Sep 2004 04:16:40 -0400 #. Look for __USE_FORTIFY_LEVEL in the header files #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Defining this macro causes some lightweight checks to be performed to detect " "some buffer overflow errors when employing various string and memory " "manipulation functions (for example, B(3), B(3), " "B(3), B(3), B(3), B(3), B(3), " "B(3), B(3), B(3), B(3), B(3), " "and wide character variants thereof). For some functions, argument " "consistency is checked; for example, a check is made that B(2) has " "been supplied with a I argument when the specified flags include " "B. Not all problems are detected, just some common cases." msgstr "" # # #. For example, given the following code #. int d; #. char buf[1000], buf[1000]; #. strcpy(fmt, "Hello world #. %n"); #. snprintf(buf, sizeof(buf), fmt, &d); #. Compiling with "gcc -D_FORTIFY_SOURCE=2 -O1" and then running will #. cause the following diagnostic at run time at the snprintf() call #. *** %n in writable segment detected *** #. Aborted (core dumped) #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "If B<_FORTIFY_SOURCE> is set to 1, with compiler optimization level 1 " "(I) and above, checks that shouldn't change the behavior of " "conforming programs are performed. With B<_FORTIFY_SOURCE> set to 2, some " "more checking is added, but some conforming programs might fail." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Some of the checks can be performed at compile time (via macros logic " "implemented in header files), and result in compiler warnings; other checks " "take place at run time, and result in a run-time error if the check fails." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "With B<_FORTIFY_SOURCE> set to 3, additional checking is added to intercept " "some function calls used with an argument of variable size where the " "compiler can deduce an upper bound for its value. For example, a program " "where B(3)'s size argument is variable can now be fortified." msgstr "" #. glibc is not an absolute requirement (gcc has libssp; NetBSD/newlib #. and Darwin each have their own implementation), but let's keep it #. simple. #. type: Plain text #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-tumbleweed msgid "" "Use of this macro requires compiler support, available since gcc 4.0 and " "clang 2.6. Use of B<_FORTIFY_SOURCE> set to 3 requires gcc 12.0 or later, " "or clang 9.0 or later, in conjunction with glibc 2.33 or later." msgstr "" #. type: SS #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "Default definitions, implicit definitions, and combining definitions" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "If no feature test macros are explicitly defined, then the following feature " "test macros are defined by default: B<_BSD_SOURCE> (in glibc 2.19 and " "earlier), B<_SVID_SOURCE> (in glibc 2.19 and earlier), B<_DEFAULT_SOURCE> " "(since glibc 2.19), B<_POSIX_SOURCE>, and B<_POSIX_C_SOURCE>=200809L " "(200112L before glibc 2.10; 199506L before glibc 2.4; 199309L before glibc " "2.1)." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "If any of B<__STRICT_ANSI__>, B<_ISOC99_SOURCE>, B<_ISOC11_SOURCE> (since " "glibc 2.18), B<_POSIX_SOURCE>, B<_POSIX_C_SOURCE>, B<_XOPEN_SOURCE>, " "B<_XOPEN_SOURCE_EXTENDED> (in glibc 2.11 and earlier), B<_BSD_SOURCE> (in " "glibc 2.19 and earlier), or B<_SVID_SOURCE> (in glibc 2.19 and earlier) is " "explicitly defined, then B<_BSD_SOURCE>, B<_SVID_SOURCE>, and " "B<_DEFAULT_SOURCE> are not defined by default." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "If B<_POSIX_SOURCE> and B<_POSIX_C_SOURCE> are not explicitly defined, and " "either B<__STRICT_ANSI__> is not defined or B<_XOPEN_SOURCE> is defined with " "a value of 500 or more, then" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "B<_POSIX_SOURCE> is defined with the value 1; and" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "B<_POSIX_C_SOURCE> is defined with one of the following values:" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "2, if B<_XOPEN_SOURCE> is defined with a value less than 500;" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "199506L, if B<_XOPEN_SOURCE> is defined with a value greater than or equal " "to 500 and less than 600; or" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "(since glibc 2.4) 200112L, if B<_XOPEN_SOURCE> is defined with a value " "greater than or equal to 600 and less than 700." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "(Since glibc 2.10) 200809L, if B<_XOPEN_SOURCE> is defined with a value " "greater than or equal to 700." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Older versions of glibc do not know about the values 200112L and 200809L for " "B<_POSIX_C_SOURCE>, and the setting of this macro will depend on the glibc " "version." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "If B<_XOPEN_SOURCE> is undefined, then the setting of B<_POSIX_C_SOURCE> " "depends on the glibc version: 199506L, before glibc 2.4; 200112L, since " "glibc 2.4 to glibc 2.9; and 200809L, since glibc 2.10." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "Multiple macros can be defined; the results are additive." msgstr "" #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "STANDARDS" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "POSIX.1 specifies B<_POSIX_C_SOURCE>, B<_POSIX_SOURCE>, and B<_XOPEN_SOURCE>." msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-leap-15-6 opensuse-tumbleweed msgid "" "B<_FILE_OFFSET_BITS> is not specified by any standard, but is employed on " "some other implementations." msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-leap-15-6 opensuse-tumbleweed msgid "" "B<_BSD_SOURCE>, B<_SVID_SOURCE>, B<_DEFAULT_SOURCE>, B<_ATFILE_SOURCE>, " "B<_GNU_SOURCE>, B<_FORTIFY_SOURCE>, B<_REENTRANT>, and B<_THREAD_SAFE> are " "specific to glibc." msgstr "" #. type: SH #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "HISTORY" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-leap-15-6 opensuse-tumbleweed msgid "" "B<_XOPEN_SOURCE_EXTENDED> was specified by XPG4v2 (aka SUSv1), but is not " "present in SUSv2 and later." msgstr "" #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "NOTES" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Ifeatures.hE> is a Linux/glibc-specific header file. Other " "systems have an analogous file, but typically with a different name. This " "header file is automatically included by other header files as required: it " "is not necessary to explicitly include it in order to employ feature test " "macros." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "According to which of the above feature test macros are defined, " "Ifeatures.hE> internally defines various other macros that are " "checked by other glibc header files. These macros have names prefixed by " "two underscores (e.g., B<__USE_MISC>). Programs should I define " "these macros directly: instead, the appropriate feature test macro(s) from " "the list above should be employed." msgstr "" #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "EXAMPLES" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The program below can be used to explore how the various feature test macros " "are set depending on the glibc version and what feature test macros are " "explicitly set. The following shell session, on a system with glibc 2.10, " "shows some examples of what we would see:" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "" "$ B\n" "$ B<./a.out>\n" "_POSIX_SOURCE defined\n" "_POSIX_C_SOURCE defined: 200809L\n" "_BSD_SOURCE defined\n" "_SVID_SOURCE defined\n" "_ATFILE_SOURCE defined\n" "$ B\n" "$ B<./a.out>\n" "_POSIX_SOURCE defined\n" "_POSIX_C_SOURCE defined: 199506L\n" "_XOPEN_SOURCE defined: 500\n" "$ B\n" "$ B<./a.out>\n" "_POSIX_SOURCE defined\n" "_POSIX_C_SOURCE defined: 200809L\n" "_ISOC99_SOURCE defined\n" "_XOPEN_SOURCE defined: 700\n" "_XOPEN_SOURCE_EXTENDED defined\n" "_LARGEFILE64_SOURCE defined\n" "_BSD_SOURCE defined\n" "_SVID_SOURCE defined\n" "_ATFILE_SOURCE defined\n" "_GNU_SOURCE defined\n" msgstr "" #. type: SS #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "Program source" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-tumbleweed #, no-wrap msgid "" "/* ftm.c */\n" "\\&\n" "#include Estdint.hE\n" "#include Estdio.hE\n" "#include Eunistd.hE\n" "#include Estdlib.hE\n" "\\&\n" "int\n" "main(int argc, char *argv[])\n" "{\n" "#ifdef _POSIX_SOURCE\n" " printf(\"_POSIX_SOURCE defined\\en\");\n" "#endif\n" "\\&\n" "#ifdef _POSIX_C_SOURCE\n" " printf(\"_POSIX_C_SOURCE defined: %jdL\\en\",\n" " (intmax_t) _POSIX_C_SOURCE);\n" "#endif\n" "\\&\n" "#ifdef _ISOC99_SOURCE\n" " printf(\"_ISOC99_SOURCE defined\\en\");\n" "#endif\n" "\\&\n" "#ifdef _ISOC11_SOURCE\n" " printf(\"_ISOC11_SOURCE defined\\en\");\n" "#endif\n" "\\&\n" "#ifdef _XOPEN_SOURCE\n" " printf(\"_XOPEN_SOURCE defined: %d\\en\", _XOPEN_SOURCE);\n" "#endif\n" "\\&\n" "#ifdef _XOPEN_SOURCE_EXTENDED\n" " printf(\"_XOPEN_SOURCE_EXTENDED defined\\en\");\n" "#endif\n" "\\&\n" "#ifdef _LARGEFILE64_SOURCE\n" " printf(\"_LARGEFILE64_SOURCE defined\\en\");\n" "#endif\n" "\\&\n" "#ifdef _FILE_OFFSET_BITS\n" " printf(\"_FILE_OFFSET_BITS defined: %d\\en\", _FILE_OFFSET_BITS);\n" "#endif\n" "\\&\n" "#ifdef _TIME_BITS\n" " printf(\"_TIME_BITS defined: %d\\en\", _TIME_BITS);\n" "#endif\n" "\\&\n" "#ifdef _BSD_SOURCE\n" " printf(\"_BSD_SOURCE defined\\en\");\n" "#endif\n" "\\&\n" "#ifdef _SVID_SOURCE\n" " printf(\"_SVID_SOURCE defined\\en\");\n" "#endif\n" "\\&\n" "#ifdef _DEFAULT_SOURCE\n" " printf(\"_DEFAULT_SOURCE defined\\en\");\n" "#endif\n" "\\&\n" "#ifdef _ATFILE_SOURCE\n" " printf(\"_ATFILE_SOURCE defined\\en\");\n" "#endif\n" "\\&\n" "#ifdef _GNU_SOURCE\n" " printf(\"_GNU_SOURCE defined\\en\");\n" "#endif\n" "\\&\n" "#ifdef _REENTRANT\n" " printf(\"_REENTRANT defined\\en\");\n" "#endif\n" "\\&\n" "#ifdef _THREAD_SAFE\n" " printf(\"_THREAD_SAFE defined\\en\");\n" "#endif\n" "\\&\n" "#ifdef _FORTIFY_SOURCE\n" " printf(\"_FORTIFY_SOURCE defined\\en\");\n" "#endif\n" "\\&\n" " exit(EXIT_SUCCESS);\n" "}\n" msgstr "" #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "SEE ALSO" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "B(7), B(7), B(7)" msgstr "" #. But beware: the info libc document is out of date (Jul 07, mtk) #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "The section \"Feature Test Macros\" under I." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "I" msgstr "" #. type: TH #: debian-bookworm #, no-wrap msgid "2023-02-05" msgstr "" #. type: TH #: debian-bookworm #, no-wrap msgid "Linux man-pages 6.03" msgstr "" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" "B<#define _GNU_SOURCE>\n" "B<#include Efcntl.hE>\n" msgstr "" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "BIB<, off64_t *>IB<, size_t >IB<);>\n" msgstr "" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 msgid "" "This format is employed in cases where only a single feature test macro can " "be used to expose the function declaration, and that macro is not defined by " "default." msgstr "" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 msgid "" "Defining this macro with the value 64 automatically converts references to " "32-bit functions and data types related to file I/O and filesystem " "operations into references to their 64-bit counterparts. This is useful for " "performing I/O on large files (E 2 Gigabytes) on 32-bit systems. " "(Defining this macro permits correctly written programs to use large files " "with only a recompilation being required.)" msgstr "" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 msgid "" "Use of this macro requires compiler support, available with B(1) since " "glibc 4.0." msgstr "" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 msgid "" "Use of B<_FORTIFY_SOURCE> set to 3 requires B(1) version 12.0 or later." msgstr "" #. type: Plain text #: debian-bookworm msgid "" "B<_XOPEN_SOURCE_EXTENDED> was specified by XPG4v2 (aka SUSv1), but is not " "present in SUSv2 and later. B<_FILE_OFFSET_BITS> is not specified by any " "standard, but is employed on some other implementations." msgstr "" #. type: Plain text #: debian-bookworm msgid "" "B<_BSD_SOURCE>, B<_SVID_SOURCE>, B<_DEFAULT_SOURCE>, B<_ATFILE_SOURCE>, " "B<_GNU_SOURCE>, B<_FORTIFY_SOURCE>, B<_REENTRANT>, and B<_THREAD_SAFE> are " "specific to Linux (glibc)." msgstr "" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "/* ftm.c */\n" msgstr "" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" "#include Estdint.hE\n" "#include Estdio.hE\n" "#include Eunistd.hE\n" "#include Estdlib.hE\n" msgstr "" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" "int\n" "main(int argc, char *argv[])\n" "{\n" "#ifdef _POSIX_SOURCE\n" " printf(\"_POSIX_SOURCE defined\\en\");\n" "#endif\n" msgstr "" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" "#ifdef _POSIX_C_SOURCE\n" " printf(\"_POSIX_C_SOURCE defined: %jdL\\en\",\n" " (intmax_t) _POSIX_C_SOURCE);\n" "#endif\n" msgstr "" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" "#ifdef _ISOC99_SOURCE\n" " printf(\"_ISOC99_SOURCE defined\\en\");\n" "#endif\n" msgstr "" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" "#ifdef _ISOC11_SOURCE\n" " printf(\"_ISOC11_SOURCE defined\\en\");\n" "#endif\n" msgstr "" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" "#ifdef _XOPEN_SOURCE\n" " printf(\"_XOPEN_SOURCE defined: %d\\en\", _XOPEN_SOURCE);\n" "#endif\n" msgstr "" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" "#ifdef _XOPEN_SOURCE_EXTENDED\n" " printf(\"_XOPEN_SOURCE_EXTENDED defined\\en\");\n" "#endif\n" msgstr "" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" "#ifdef _LARGEFILE64_SOURCE\n" " printf(\"_LARGEFILE64_SOURCE defined\\en\");\n" "#endif\n" msgstr "" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" "#ifdef _FILE_OFFSET_BITS\n" " printf(\"_FILE_OFFSET_BITS defined: %d\\en\", _FILE_OFFSET_BITS);\n" "#endif\n" msgstr "" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" "#ifdef _TIME_BITS\n" " printf(\"_TIME_BITS defined: %d\\en\", _TIME_BITS);\n" "#endif\n" msgstr "" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" "#ifdef _BSD_SOURCE\n" " printf(\"_BSD_SOURCE defined\\en\");\n" "#endif\n" msgstr "" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" "#ifdef _SVID_SOURCE\n" " printf(\"_SVID_SOURCE defined\\en\");\n" "#endif\n" msgstr "" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" "#ifdef _DEFAULT_SOURCE\n" " printf(\"_DEFAULT_SOURCE defined\\en\");\n" "#endif\n" msgstr "" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" "#ifdef _ATFILE_SOURCE\n" " printf(\"_ATFILE_SOURCE defined\\en\");\n" "#endif\n" msgstr "" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" "#ifdef _GNU_SOURCE\n" " printf(\"_GNU_SOURCE defined\\en\");\n" "#endif\n" msgstr "" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" "#ifdef _REENTRANT\n" " printf(\"_REENTRANT defined\\en\");\n" "#endif\n" msgstr "" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" "#ifdef _THREAD_SAFE\n" " printf(\"_THREAD_SAFE defined\\en\");\n" "#endif\n" msgstr "" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" "#ifdef _FORTIFY_SOURCE\n" " printf(\"_FORTIFY_SOURCE defined\\en\");\n" "#endif\n" msgstr "" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " exit(EXIT_SUCCESS);\n" "}\n" msgstr "" #. type: TH #: fedora-40 fedora-rawhide mageia-cauldron #, no-wrap msgid "2023-10-31" msgstr "" #. type: TH #: fedora-40 mageia-cauldron #, no-wrap msgid "Linux man-pages 6.06" msgstr "" #. type: TH #: fedora-rawhide #, no-wrap msgid "Linux man-pages 6.7" msgstr "" #. type: TH #: opensuse-leap-15-6 #, no-wrap msgid "2023-03-30" msgstr "" #. type: TH #: opensuse-leap-15-6 #, no-wrap msgid "Linux man-pages 6.04" msgstr "" #. type: TH #: opensuse-tumbleweed #, no-wrap msgid "Linux man-pages (unreleased)" msgstr ""