Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

standards(5) [hpux man page]

standards(5)							File Formats Manual						      standards(5)

NAME
standards - UNIX standards behavior on HP-UX DESCRIPTION
HP-UX conforms to various UNIX standards. In some cases, these standards conflict. This manpage describes the methods that programmers and users must follow to have an application conform and execute according to a particular UNIX standard. UNIX Standard Conformant Programmer Environment The following table lists feature test macros and environment variables that must be defined while compiling an application. Both a fea- ture test macro and an environment variable must be defined while compiling the application so that the application conforms and executes according to a particular UNIX standard. Otherwise, the behavior is undefined. Standard Feature Test Macros to be Environment variable defined during compilation to be set UNIX 95 _XOPEN_SOURCE_EXTENDED=1 UNIX95 or UNIX_STD=95 or UNIX_STD=1995 UNIX 2003 _XOPEN_SOURCE=600 UNIX_STD=2003 The compiler uses the feature test macros to obtain the appropriate namespace from the header files. The compiler uses the environment variable to link in an appropriate object file to the executable. Using the environment variable customizes libc to match UNIX standards for various functions. If an application has already been compiled for default HP-UX behavior or for one particular standard, and needs to change to a particular UNIX standard behavior, recompile the application as specified in the above table. For an HP-UX command to conform to a particular UNIX standard behavior, the application has to set the corresponding environment variable as specified in the above table before executing that command. UNIX Standard Conformant User Environment To enable a particular UNIX standard conformant user environment, set the corresponding environment variable as defined in the above table. EXAMPLES
The following examples shows an application example. To have the system be conformant to UNIX2003 behavior, set the environment variable to and define the feature test macro before compilation. The following example changes the command to have UNIX95 behavior by setting one of the environment variables to or to before executing that command. There are three ways of setting the environment variable for UNIX95: or or SEE ALSO
cc(1), stdsyms(5). standards(5)

Check Out this Related Man Page

ttyslot(3)						     Library Functions Manual							ttyslot(3)

NAME
ttyslot - Finds the slot for the current user in the user accounting database LIBRARY
Standard C Library (libc.so, libc.a) SYNOPSIS
#include <stdlib.h> int ttyslot (void); STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: ttyslot(): XSH4.2 Refer to the standards(5) reference page for more information about industry standards and associated tags. DESCRIPTION
The ttyslot() function returns the index of the current user's entry in the user accounting database. The current user's entry is an entry for which the utline member matches the name of a terminal device associated with any of the process' file descriptors 0, 1, or 2 (standard input, standard output, or error output). The index is an ordinal number representing the record number in the database of the current user's entry. The first entry in the database is represented by the return value 0 (zero). NOTES
The ttyslot() function is scheduled to be withdrawn in a future version of the X/Open CAE Specification. [Tru64 UNIX] When compiled in the X/Open UNIX environment, calls to the ttyslot() function are internally renamed by prepending _E to the function name. When you are debugging a module that includes the ttyslot() function and for which _XOPEN_SOURCE_EXTENDED has been defined, use _Ettyslot to refer to the ttyslot() call. See standards(5) for information on when the _XOPEN_SOURCE_EXTENDED macro is defined. RETURN VALUES
Upon successful completion, the ttyslot() function returns the index of the current user's entry in the user accounting database. If an error is encountered while searching the database, or if none of the file descriptors 0, 1, or 2 is associated with a terminal device, -1 is returned. The following behavior does not conform to the current standards, and is supported only for backward compatibility. [Tru64 UNIX] In applications that are compiled in an environment that excludes the _XOPEN_SOURCE_EXTENDED standard definitions, the ttys- lot() function returns 0 (zero) on error. RELATED INFORMATION
Functions: getutxent(3), ttyname(3) Standards: standards(5) delim off ttyslot(3)
Man Page