玛尼石是什么意思| 甲流是什么| 已归档是什么意思| 梧桐树长什么样子| 张国荣属什么生肖| 主播是什么意思| 什么叫走读生| 嘱托是什么意思| 小腿胀痛是什么原因| 眼压高滴什么眼药水| kub是什么检查| 减肥最好的办法是什么| 固精缩尿是什么意思| 肠炎有什么表现| 酒精和碘伏有什么区别| 大学记过处分有什么影响| 硬座是什么意思| 屁多是什么情况| 痰是棕色的是什么原因| 孩子咬指甲什么原因| 甘油脂肪酸酯是什么| doms是什么意思| 抽搐是什么原因引起的| 脚抽筋是什么原因| 月经前有褐色分泌物是什么原因| 车辆购置税什么时候交| pb是什么| 炁读什么| 产后漏尿是什么原因| 前列腺炎有什么症状| 胃泌素高是什么原因| 胳膊上的肌肉叫什么| 多愁善感什么意思| 痛风看什么科| 女的什么时候退休| 总胆红素偏高说明什么| 肾主骨是什么意思| 冲喜什么意思| 鬼畜什么意思| 散光是什么症状| 宸字属于五行属什么| 什么样人不能吃海参| 基因是什么意思| 碘吃多了有什么危害| 在五行中属什么| 纪元是什么意思| 异性恋是什么意思| 男人有霉菌是什么症状| 什么的闪电| 女人吃什么对卵巢和子宫好| 甲状腺密度不均匀是什么意思| 窦性心动过速是什么原因| 做梦丢钱了什么征兆| 腊肠和什么菜炒最佳| 鼻窦炎是什么原因引起的呢| 列文虎克发现了什么| 风平浪静是什么生肖| 心动过速吃什么药最好| 评审是什么意思| 总是口渴是什么原因| 七夕送什么礼物好| 阿僧只劫是什么意思| 孕妇可以喝什么汤| 吃什么东西可以降压| 依巴斯汀片是什么药| 天蝎座和什么星座最不配| 醒酒喝什么| 肺火旺吃什么药| epl是什么意思| 放血有什么好处| 小别胜新婚什么意思| 摩羯座女和什么座最配| 蟋蟀是靠什么发声的| 智商120是什么水平| 风湿是什么| 奇行种什么意思| 小指麻木是什么原因| 女人吃生蚝有什么好处| 91岁属什么| xswl什么意思| 口腔发粘是什么原因| 为什么午睡起来会头疼| 洗钱是什么意思| 后脑勺痛什么原因引起的| 一什么千什么| 嘴唇痒边缘痒用什么药| 甘油三酯高挂什么科| 封神是什么意思| 打破伤风不能吃什么| 来月经头疼是什么原因| 旦上面加一横是什么字| 长期口臭吃什么药| 什么是本命年| 一个火一个丙念什么| 红细胞偏低有什么危害| 拧巴是什么意思| 什么是双向情感障碍| 什么样的普洱茶才是好茶| 腰肌劳损是什么意思| 吃黄瓜有什么好处| 鸡呜狗盗是什么生肖| 掉头发补充什么维生素| 挫伤是什么意思| 40岁男人性功能减退是什么原因| 脚底脱皮用什么药| 脚冷是什么原因| 喝酒前喝什么不容易醉| lsa是什么胎位| uu什么意思| 阴虱是什么样子图片| 为什么梦不到死去的亲人| 无故流鼻血是什么原因| 熬夜吃什么对身体好| 霉菌性阴道炎是什么| 即使什么也什么| 1069是什么意思| 舌头生疮是什么原因引起的| 反酸是什么意思| 医生为什么看瞳孔知道没救了| 千与千寻是什么意思| 什么时候跑步减肥效果最好| 开瑞坦是什么药| ray是什么意思| 肌酸激酶高吃什么药| 心脏斑块是什么意思啊| 手上起小水泡是什么原因| 喜神是什么意思| 铁皮石斛能治什么病| 开什么节什么的成语| 大云是什么烟| 睡着了咳嗽是什么原因| 五合是什么意思| 防微杜渐是什么意思| 遭罪是什么意思| 人授后吃什么容易着床| 每天早上起床头晕是什么原因| marni是什么牌子| 鹿代表什么生肖| 肚脐叫什么穴位| 乙肝病毒表面抗体高是什么意思| 一片冰心在玉壶的冰心是什么意思| 上眼药是什么意思| 芦荟有什么用| 肺部气肿吃什么药能治好| 米线里的麻油是什么油| 含漱是什么意思| 巫山云雨是什么意思| 聚字五行属什么| 亦如是什么意思| 有什么树| 手突然抽搐是什么原因| 消肿吃什么食物好| 社论是什么| sanyo是什么牌子| 直肠炎吃什么药最好| 早晨起床手麻是什么原因| 梦见自己鼻子流血是什么预兆| 尿常规粘液丝高是什么意思| 吃什么祛湿| tpo是什么| 百合的花语是什么| 做ct需要注意什么| 蝎子吃什么东西| 心脏房颤是什么意思| 薛之谦为什么离婚| 东北有什么好玩的景点| 胆囊壁毛糙吃什么药| 良心是什么| pro什么意思| 芥酸对身体有什么危害| 辣椒为什么会辣| 缺铁性贫血吃什么药| 6月底是什么星座| 千焦是什么意思| 中核集团是什么级别| 偏头痛吃什么药效果好| 脾脏大是什么原因| 汗是什么味道| 什么季节减肥效果最快最好| 口腔黏膜挂什么科| jones是什么意思| bella是什么意思| 吃什么食物排湿气| 属蛇的人适合佩戴什么| 女人吃槐花有什么好处| 女生读什么技校好| 西米露是什么| 水煮鱼用什么鱼做好吃| 肠息肉是什么原因引起的| 包二奶是什么意思| 胃疼是什么原因| 1947年属猪的是什么命| 白带拉丝是什么原因| 高血压一般在什么年龄| 中标是什么意思| 冷敷眼睛有什么好处| 慢性荨麻疹是什么症状| 双修是什么意思| 五十岁叫什么之年| 孕妇梦见猪是什么意思| 肝脏的作用是什么| 怀孕什么时候打胎最合适| 女人取环什么时候最好| 什么地飞翔| 乳房肿胀是什么原因| 偷梁换柱是什么意思| 婴儿头发竖起来是什么原因| 枯草热是什么病| 世界上最大的昆虫是什么| 浅表性胃炎是什么意思| 百合什么时候种植最好| 什么是答题卡| 外痔疼痛用什么药最好| 渡劫什么意思| 感冒有什么症状| 什么药清肺化痰好| 孕晚期缺铁对胎儿有什么影响| 上吐下泻是什么原因| 益生菌对人体有什么好处| 崩塌的读音是什么| 洗澡有什么好处| 遁入空门是什么意思| 尿hcg阳性是什么意思| 6个月宝宝可以吃什么水果| 痛风打什么针| 胃一阵一阵绞痛是什么原因| 家里有蜈蚣是什么原因| 姨妈不正常是什么原因| oz是什么单位| 计发月数是什么意思| 尿频尿急尿不尽吃什么药最快见效| 龙年是什么年| 什么球会自己长大| 但求无愧于心上句是什么| 生理期是什么意思| 什么军什么马| 92年属什么| 支原体和衣原体有什么区别| 脚老是抽筋是什么原因| 为什么都说头胎很重要| 什么是肠息肉| 八月十五是什么星座| 退休工资什么时候补发| 上山下金是什么字| 危险是什么意思| 铁蛋白低是什么意思| 小孩子晚上睡觉磨牙是什么原因| 晚上十二点是什么时辰| 何炅的老婆叫什么名字| 情人和小三的区别是什么| 焦虑症吃什么药好得快| 血红蛋白偏低什么意思| 酒后大量出虚汗什么原因| 吃生姜对身体有什么好处和坏处| 阿司匹林治什么病| 什么是高危行为| 白酒是什么时候出现的| 一动就出汗是什么原因| 勇者胜的上半句是什么| 口臭口干口苦是什么原因| 宜家宜室什么意思| 狮子的天敌是什么动物| 为什么右眼一直跳| amy什么意思| 百度
man pages section 5: Standards, Environments, and Macros

Exit Print View

Updated: July 2014
 
 

POSIX.1(5)

Name

standards, ANSI, C, C++, ISO, POSIX, POSIX.1, POSIX.2, SUS, SUSv2, SUSv3, SVID, SVID3, XNS, XNS4, XNS5, XPG, XPG3, XPG4, XPG4v2 - standards and specifications supported by Oracle Solaris

Description

Oracle Solaris supports IEEE Std 1003.1 and IEEE Std 1003.2, commonly known as POSIX.1 and POSIX.2, respectively. The following table lists each version of these standards with a brief description and the SunOS or Solaris release that first conformed to it.

POSIX Standard
Description
Release
POSIX.1-1988
system interfaces and headers
SunOS 4.1
POSIX.1-1990
POSIX.1-1988 update
Solaris 2.0
POSIX.1b-1993
realtime extensions
Solaris 2.4
POSIX.1c-1996
threads extensions
Solaris 2.6
POSIX.2-1992
shell and utilities
Solaris 2.5
POSIX.2a-1992
interactive shell and utilities
Solaris 2.5
POSIX.1–2001
POSIX.1-1990, POSIX.1b-1993, POSIX.1c-1996, POSIX.2-1992, and POSIX.2a-1992 updates
Solaris 10
POSIX.1-2004
POSIX.1-2001 update
Oracle Solaris 11

Oracle Solaris also supports the X/Open Common Applications Environment (CAE) Portability Guide Issue 3 (XPG3) and Issue 4 (XPG4); Single UNIX Specification (SUS, also known as XPG4v2); Single UNIX Specification, Version 2 (SUSv2); and Single UNIX Specification, Version 3 (SUSv3). Both XPG4 and SUS include Networking Services Issue 4 (XNS4). SUSv2 includes Networking Services Issue 5 (XNS5).

The following table lists each X/Open specification with a brief description and the SunOS or Solaris release that first conformed to it.

X/Open CAE
Specification
Description
Release
XPG3
superset of POSIX.1-1988 containing utilities from SVID3
SunOS 4.1
XPG4
superset of POSIX.1-1990, POSIX.2-1992, and POSIX.2a-1992 containing extensions to POSIX standards from XPG3
Solaris 2.4
SUS (XPG4v2)
superset of XPG4 containing historical BSD interfaces widely used by common application packages
Solaris 2.6
XNS4
sockets and XTI interfaces
Solaris 2.6
SUSv2
superset of SUS extended to support POSIX.1b-1993, POSIX.1c-1996, and ISO/IEC 9899 (C Standard) Amendment 1
Solaris 7
XNS5
superset and LP64-clean derivative of XNS4.
Solaris 7
SUSv3
same as POSIX.1–2001
Solaris 10

The XNS4 specification is safe for use only in ILP32 (32-bit) environments and should not be used for LP64 (64-bit) application environments. Use XNS5 or SUSv3, which have LP64-clean interfaces that are portable across ILP32 and LP64 environments. Solaris releases 7 through Oracle Solaris 11 support both the ILP32 and LP64 environments.

Solaris releases 7 through 10 have been branded to conform to The Open Group's UNIX 98 Product Standard. Solaris 10 through Oracle Solaris 11 have been branded to conform to The Open Group's UNIX 03 Product Standard.

Solaris releases 2.0 through Oracle Solaris 11 support the interfaces specified by the System V Interface Definition, Third Edition, Volumes 1 through 4 (SVID3). Note, however, that since the developers of this specification (UNIX Systems Laboratories) are no longer in business and since this specification defers to POSIX and X/Open CAE specifications, there is some disagreement about what is currently required for conformance to this specification.

When Oracle Solaris Studio 12.3 C Compiler is installed, Oracle Solaris 11 supports the ANSI X3.159-1989 Programming Language - C and ISO/IEC 9899:1990 Programming Language - C (C) interfaces.

When Oracle Solaris Studio 12.3 C Compiler is installed, Oracle Solaris 11 supports ISO/IEC 9899:1990 Amendment 1:1995: C Integrity.

When Oracle Solaris Studio 12.3 C Compiler is installed, Oracle Solaris 11 supports ISO/IEC 9899:1999 Programming Languages – C.

When Oracle Solaris Studio 12.3 C++ Compiler is installed, Oracle Solaris 11 supports ISO/IEC 14882:1998 Programming Languages - C++. Unsupported features of that standard are described in the compiler README file.

Utilities

If the behavior required by POSIX.2, POSIX.2a, XPG4, SUS, or SUSv2 conflicts with historical Solaris utility behavior, the original Solaris version of the utility is unchanged; a new version that is standard-conforming has been provided in /usr/xpg4/bin. If the behavior required by POSIX.1–2001 or SUSv3 conflicts with historical Solaris utility behavior, a new version that is standard-conforming has been provided in /usr/xpg4/bin or in /usr/xpg6/bin. If the behavior required by POSIX.1–2001 or SUSv3 conflicts with POSIX.2, POSIX.2a, SUS, or SUSv2, a new version that is SUSv3 standard-conforming has been provided in /usr/xpg6/bin.

An application that wants to use standard-conforming utilities must set the PATH ( sh (1) or ksh (1) ) or path ( csh (1) ) environment variable to specify the directories listed below in the order specified to get the appropriate utilities:

SVID3, XPG3
  1. /usr/bin

  2. directory containing binaries for your compiler

  3. other directories containing binaries needed by the application

POSIX.2, POSIX.2a, SUS, SUSv2, XPG4
  1. /usr/xpg4/bin

  2. /usr/bin

  3. directory containing binaries for your compiler

  4. other directories containing binaries needed by the application

POSIX.1–2001, SUSv3
  1. /usr/xpg6/bin

  2. /usr/xpg4/bin

  3. /usr/bin

  4. directory containing binaries for your compiler

  5. other directories containing binaries needed by the application

When an application uses execlp() or execvp() (see exec(2)) to execute a shell file, or uses system(3C), the shell used to interpret the shell file depends on the standard to which the caller conforms:

Standard
Shell Used
1989 ANSI C, 1990 ISO C, 1999 ISO C, POSIX.1 (1990–2001), SUS, SUSv2, SUSv3, XPG4
/usr/xpg4/bin/sh
POSIX.1 (1988), SVID3, XPG3, no standard specified
/usr/bin/sh

Feature Test Macros

Feature test macros are used by applications to indicate additional sets of features that are desired beyond those specified by the C standard. If an application uses only those interfaces and headers defined by a particular standard (such as POSIX or X/Open CAE), then it need only define the appropriate feature test macro specified by that standard. If the application is using interfaces and headers not defined by that standard, then in addition to defining the appropriate standard feature test macro, it must also define __EXTENSIONS__. Defining __EXTENSIONS__ provides the application with access to all interfaces and headers not in conflict with the specified standard. The application must define __EXTENSIONS__ either on the compile command line or within the application source files.

1989 ANSI C, 1990 ISO C, 1999 ISO C

No feature test macros need to be defined to indicate that an application is a conforming C application.

ANSI/ISO C++

ANSI/ISO C++ does not define any feature test macros. If the standard C++ announcement macro __cplusplus, predefined by the compiler based on compiler defaults and command-line options, is set to a value of 199711 or greater, the compiler operates in a standard-conforming mode, indicating C++ standards conformance. The value 199711 indicates conformance to ISO/IEC 14882:1998, as required by that standard. (As noted above, conformance to the standard is incomplete.)

C++ bindings are not defined for POSIX or X/Open CAE, so specifying feature test macros such as _POSIX_SOURCE, _POSIX_C_SOURCE, and _XOPEN_SOURCE can result in compilation errors due to conflicting requirements of standard C++ and those specifications.

POSIX

Applications that are intended to be conforming POSIX.1 applications must define the feature test macros specified by the standard before including any headers. For the standards listed below, applications must define the feature test macros listed. Application writers must check the corresponding standards for other macros that can be queried to determine if desired options are supported by the implementation.

POSIX Standard
Feature Test Macros
POSIX.1-1990
_POSIX_SOURCE
POSIX.1-1990 and POSIX.2-1992 C-Language Bindings Option
_POSIX_SOURCE and _POSIX_C_SOURCE=2
POSIX.1b-1993
_POSIX_C_SOURCE=199309L
POSIX.1c-1996
_POSIX_C_SOURCE=199506L
POSIX.1–2001
_POSIX_C_SOURCE=200112L
SVID3

The SVID3 specification does not specify any feature test macros to indicate that an application is written to meet SVID3 requirements. The SVID3 specification was written before the C standard was completed.

X/Open CAE

To build or compile an application that conforms to one of the X/Open CAE specifications, use the following guidelines. Applications need not set the POSIX feature test macros if they require both CAE and POSIX functionality.

XPG3

The application must define _XOPEN_SOURCE. If _XOPEN_SOURCE is defined with a value, the value must be less than 500.

XPG4

The application must define _XOPEN_SOURCE and set _XOPEN_VERSION=4. If _XOPEN_SOURCE is defined with a value, the value must be less than 500.

SUS (XPG4v2)

The application must define _XOPEN_SOURCE and set _XOPEN_SOURCE_EXTENDED=1. If _XOPEN_SOURCE is defined with a value, the value must be less than 500.

SUSv2

The application must define _XOPEN_SOURCE=500.

SUSv3

The application must define _XOPEN_SOURCE=600.

Compilation

The Oracle Solaris Studio 12.3 C Compiler provides the ISO/IEC 99899:1999 (1999 ISO C Language) standard-conforming compilation system and the c99 utility.

When ld is used directly to link applications, /usr/lib/values-xpg4.o must be specified on any link/load command line, unless the application is POSIX.1–2001– or SUSv3–conforming, in which case /usr/lib/values-xpg6.o must be specified on any link/load compile line. When cc or CC is used to link applications, the compiler automatically adds the appropriate file. The preferred way to build applications, however, is described in the table below.

An XNS4- or XNS5-conforming application must include –l XNS on any link/load command line in addition to defining the feature test macros specified for SUS or SUSv2, respectively.

If the compiler supports the redefine_extname pragma feature (the Oracle Solaris Studio 12.3 C Compiler and the Oracle Solaris Studio 12.3 C++ Compiler define the macro __PRAGMA_REDEFINE_EXTNAME to indicate that they support this feature), then the standard headers use #pragma redefine_extname directives to properly map function names onto library entry point names. This mapping provides full support for ISO C, POSIX, and X/Open namespace reservations.

If this pragma feature is not supported by the compiler, the headers use the #define directive to map internal function names onto appropriate library entry point names. In this instance, applications should avoid using the explicit 64-bit file offset symbols listed on the lf64(5) manual page, since these names are used by the implementation to name the alternative entry points.

When using the Oracle Solaris Studio 12.3 C Compiler, applications conforming to the specifications listed above should be compiled using the utilities and flags indicated in the following table:

Specification            Compiler/Flags         Feature Test Macros
_________________________________________________________________________
1989 ANSI C and 1990 ISO C    c89                none
_________________________________________________________________________
1999 ISO C                    c99                none
_________________________________________________________________________
SVID3                         cc -Xt -xc99=none  none
_________________________________________________________________________
POSIX.1-1990                  c89                _POSIX_SOURCE
_________________________________________________________________________
POSIX.1-1990 and POSIX.2-1992 c89                _POSIX_SOURCE  and
  C-Language Bindings Option                     POSIX_C_SOURCE=2
_________________________________________________________________________
POSIX.1b-1993                 c89                _POSIX_C_SOURCE=199309L
_________________________________________________________________________
POSIX.1c-1996                 c89                _POSIX_C_SOURCE=199506L
_________________________________________________________________________
POSIX.1-2001                  c99                _POSIX_C_SOURCE=200112L
_________________________________________________________________________
POSIX.1c-1996                 c89                _POSIX_C_SOURCE=199506L
_________________________________________________________________________
CAE XPG3                      cc -Xa -xc99=none  _XOPEN_SOURCE
_________________________________________________________________________
CAE XPG4                      c89                _XOPEN_SOURCE and
                                                 _XOPEN_VERSION=4
_________________________________________________________________________
SUS (CAE XPG4v2)              c89                _XOPEN_SOURCE and
  (includes XNS4)                                 _XOPEN_SOURCE_EXTENDED=1
_________________________________________________________________________
SUSv2 (includes XNS5)         c89                _XOPEN_SOURCE=500
_________________________________________________________________________
SUSv3                         c99                _XOPEN_SOURCE=600

For platforms supporting the LP64 (64-bit) programming environment, SUSv2–conforming LP64 applications using XNS5 library calls should be built with command lines of the form:

c89 $(getconf XBS5_LP64_OFF64_CFLAGS) -D_XOPEN_SOURCE=500 \
    $(getconf XBS5_LP64_OFF64_LDFLAGS) foo.c -o foo \
    $(getconf XBS5_LP64_OFF64_LIBS) -lxnet

Similar SUSv3–conforming LP64 applications should be built with command lines of the form:

c99 $(getconf POSIX_V6_LP64_OFF64_CFLAGS) -D_XOPEN_SOURCE=600 \
    $(getconf POSIX_V6_LP64_OFF64_LDFLAGS) foo.c -o foo \
    $(getconf POSIX_V6_LP64_OFF64_LIBS) -lxnet
SUSv3
c99

_XOPEN_SOURCE=600

See also

csh(1), ksh(1), sh(1), exec(2), sysconf(3C), system(3C), environ(5), lf64(5)

坐月子能吃什么 6月13号是什么星座 猫不喜欢什么味道 小腿为什么会抽筋 莲花和荷花有什么区别
开理疗店需要什么证件 5.5号是什么星座 孕妇梦见下雨是什么意思 跳楼机是什么 不期而遇什么意思
喝酒喝多了有什么危害 什么是喜欢 铁铁什么意思 卸妆用什么最好 4月1日是什么星座
为什么说 感光食物是什么意思 现在去贵州穿什么衣服 射手座是什么象 间隔旁型肺气肿是什么
空调感冒吃什么药hcv9jop3ns8r.cn 月经来了头疼是什么原因导致的hcv9jop1ns5r.cn 青蛙像什么qingzhougame.com 蜂蜜与什么食物相克hcv8jop4ns4r.cn 病入膏肓是什么意思beikeqingting.com
耄耋读什么helloaicloud.com 白斑是什么原因引起的hcv9jop3ns8r.cn 有氧运动是什么意思hcv9jop6ns9r.cn 生育能力检查挂什么科hcv8jop4ns8r.cn 蜈蚣最怕什么东西hcv8jop6ns1r.cn
风热感冒是什么意思hcv9jop4ns4r.cn 过敏不能吃什么hcv8jop3ns1r.cn 榴莲什么味道hcv7jop6ns3r.cn 脯氨酸氨基肽酶阳性是什么意思hcv8jop7ns2r.cn 拔罐颜色深浅代表什么hcv9jop0ns3r.cn
小孩嘴唇发红是什么原因hcv8jop1ns1r.cn 骨髓炎是什么症状hcv8jop7ns8r.cn 冉是什么意思dajiketang.com 地球属于什么星hcv9jop4ns5r.cn 屠苏指的是什么wuhaiwuya.com
百度