man -a ffs).#define'd by <unistd.h>.
There
are
many
more
of
these
which describe the various options of the
standard.#if _POSIX_VERSION >=
200112L /* Use the newer function that copes with large
files. */ off_t pos=ftello(fp);#else /* Either this is an old version of POSIX, or
_POSIX_VERSION is * not even defined, so use the traditional
function.
*/ long pos=ftell(fp);#endifif (sysconf(_SC_VERSION) <
200112L) { fprintf(stderr, "POSIX.1-2001 system required,
terminating.\n"); exit(1);}bcopy() with memcpy()._POSIX_C_SOURCE to be 200809L before any
header is included._XOPEN_SOURCE to be 700 before any
header is included.600 for
the 2001 edition of the standard.200809L and 700 for
the 2008 edition of the standard.c99 -D_POSIX_C_SOURCE=200112L
prog.c
c99 -D_XOPEN_SOURCE=600 prog.c_POSIX_C_SOURCE to 200112L.
Use gcc
-std=c99 instead of c99 on Linux or Mac OS X.600 for
the 2001 edition of the standard.200809L and 700 for
the 2008 edition of the standard.| Header |
Posix
Standard description |
Option |
APUE |
<aio.h> |
asynchronous input and output |
AIO |
|
<arpa/inet.h> |
definitions for internet
operations |
16. |
|
<assert.h> |
verify program assertion |
C99 |
|
<complex.h> |
complex arithmetic |
C99 |
|
<cpio.h> |
cpio archive values |
XSI |
|
<ctype.h> |
character types |
C99 |
|
<dirent.h> |
format of directory entries |
4.21 |
|
<dlfcn.h> |
dynamic linking |
XSI |
|
<errno.h> |
system error numbers |
C99 |
|
<fcntl.h> |
file control options |
3.14 |
|
<fenv.h> |
floating-point environment |
C99 |
|
<float.h> |
floating types |
C99 |
|
<fmtmsg.h> |
message display structures |
XSI |
|
<fnmatch.h> |
filename-matching types |
||
<ftw.h> |
file tree traversal |
XSI |
4.21 |
<glob.h> |
pathname pattern-matching
types |
||
<grp.h> |
group structure |
6.4 |
|
<iconv.h> |
codeset conversion facility |
XSI |
|
<inttypes.h> |
fixed size integer types |
C99 |
|
<iso646.h> |
alternative spellings |
C99 |
|
<langinfo.h> |
language information
constants |
XSI |
|
<libgen.h> |
definitions for pattern
matching
functions |
XSI |
|
<limits.h> |
implementation-defined
constants |
C99 |
|
<locale.h> |
category macros |
C99 |
|
<math.h> |
mathematical declarations |
C99 |
|
<monetary.h> |
monetary types |
XSI |
|
<mqueue.h> |
message queues |
MSG |
|
<ndbm.h> |
definitions for ndbm database
operations |
XSI |
|
<net/if.h> |
sockets local interfaces |
16. |
|
<netdb.h> |
definitions for network
database
operations |
||
<netinet/in.h> |
Internet address family |
16.3 |
|
<netinet/tcp.h> |
definitions for the Internet
Transmission Control Protocol (TCP) |
||
<nl_types.h> |
data types |
XSI |
|
<poll.h> |
definitions for the poll( )
function |
XSI |
14.5.2 |
<pthread.h> |
threads |
THR |
11., 12. |
<pwd.h> |
password structure |
6.2 |
|
<regex.h> |
regular expression matching
types |
||
<sched.h> |
execution scheduling |
PS |
|
<search.h> |
search tables |
XSI |
|
<semaphore.h> |
semaphores |
SEM |
|
<setjmp.h> |
stack environment
declarations |
C99 |
|
<signal.h> |
signals |
C99 |
|
<spawn.h> |
spawn |
SPN |
|
<stdarg.h> |
handle variable argument list |
C99 |
|
<stdbool.h> |
boolean type and values |
C99 |
|
<stddef.h> |
standard type definitions |
C99 |
|
<stdint.h> |
integer types |
C99 |
|
<stdio.h> |
standard buffered
input/output |
C99 |
|
<stdlib.h> |
standard library definitions |
C99 |
|
<string.h> |
string operations |
C99 |
|
<strings.h> |
string operations |
XSI |
|
<stropts.h> |
STREAMS interface |
XSR |
14.4 |
<sys/ipc.h> |
XSI interprocess
communication
access structure |
XSI |
15.6 |
<sys/mman.h> |
memory management
declarations |
||
<sys/msg.h> |
memory management
declarations |
XSI |
15.7 |
<sys/resource.h> |
definitions for XSI resource
operations |
XSI |
7.11 |
<sys/select.h> |
select types |
14.5.1 |
|
<sys/sem.h> |
XSI semaphore facility |
XSI |
15.8 |
<sys/shm.h> |
XSI shared memory facility |
XSI |
15.9 |
<sys/socket.h> |
main sockets header |
16. |
|
<sys/stat.h> |
data returned by the stat( )
function |
4. |
|
<sys/statvfs.h> |
VFS File System information
structure |
XSI |
|
<sys/time.h> |
time types |
XSI |
|
<sys/timeb.h> |
additional definitions for
date
and time |
XSI |
|
<sys/times.h> |
file access and modification
times structure |
8.16 |
|
<sys/types.h> |
data types |
2.8 |
|
<sys/uio.h> |
definitions for vector I/O
operations |
XSI |
14.7 |
<sys/un.h> |
definitions for UNIX domain
sockets |
17.3 |
|
<sys/utsname.h> |
system name structure |
6.9 |
|
<sys/wait.h> |
declarations for waiting |
8.6 |
|
<syslog.h> |
definitions for system error
logging |
XSI |
13.4 |
<tar.h> |
extended tar definitions |
||
<termios.h> |
define values for termios
(terminal I/O) |
18. |
|
<tgmath.h> |
type-generic macros |
C99 |
|
<time.h> |
time types |
C99 |
|
<trace.h> |
tracing |
TRC |
|
<ucontext.h> |
user context |
XSI |
|
<ulimit.h> |
ulimit commands |
XSI |
|
<unistd.h> |
standard symbolic constants
and
types |
various |
|
<utime.h> |
access and modification times
structure |
4.19 |
|
<utmpx.h> |
user accounting database
definitions |
XSI |
|
<wchar.h> |
wide-character handling |
C99 |
|
<wctype.h> |
wide-character classification
and mapping utilities |
C99 |
|
<wordexp.h> |
word-expansion types |
typedef,
or
struct or union declaration, which
actually implements the type, and which follows rules set by the
standard, but the implementation itself is not given by the
standard.pthread_t type
is
defined in <sys/types.h>, which is included by
the
more obvious choice <pthread.h>.| Header |
Type |
Description |
<termios.h> |
cc_t |
Type used for terminal special characters. |
<sys/types.h> |
clock_t |
Integer or real-floating type used for processor times, as defined in the ISO C standard. |
<sys/types.h> |
clockid_t |
Used for clock ID type in some timer functions. |
<sys/types.h> |
dev_t |
Arithmetic type used for device numbers. |
<dirent.h> |
DIR |
Type representing a directory stream. |
<stdlib.h> |
div_t |
Structure type returned by the div()
function. |
<stdio.h> |
FILE |
Structure containing information about a file. |
<glob.h> |
glob_t |
Structure type used in pathname pattern matching. |
<stdio.h> |
fpos_t |
Type containing all information needed to specify uniquely every position within a file. |
<sys/types.h> |
gid_t |
Integer type used for group IDs. |
<ioconv.h> |
iconv_t |
Type used for conversion descriptors. |
<sys/types.h> |
id_t |
Integer type used as a general identifier; can be used to
contain at least the largest of a pid_t, uid_t,
or gid_t. |
<sys/types.h>
|
ino_t |
Unsigned integer type used for file serial numbers. |
<sys/types.h>
|
key_t |
Arithmetic type used for XSI interprocess communication. |
<stdlib.h> |
ldiv_t |
Structure type returned by the ldiv()
function. |
<sys/types.h>
|
mode_t |
Integer type used for file attributes. |
<mqueue.h> |
mqd_t |
Used for message queue descriptors. |
<poll.h> |
nfds_t |
Integer type used for the number of file descriptors. |
<sys/types.h>
|
nlink_t |
Integer type used for link counts. |
<sys/types.h>
|
off_t |
Signed integer type used for file sizes. |
<sys/types.h>
|
pid_t |
Signed integer type used for process and process group IDs. |
<sys/types.h>
|
pthread_attr_t |
Used to identify a thread attribute object. |
<sys/types.h>
|
pthread_cond_t |
Used for condition variables. |
<sys/types.h>
|
pthread_condattr_t |
Used to identify a condition attribute object. |
<sys/types.h>
|
pthread_key_t |
Used for thread-specific data keys. |
<sys/types.h>
|
pthread_mutex_t |
Used for mutexes. |
<sys/types.h>
|
pthread_mutexattr_t |
Used to identify a mutex attribute object. |
<sys/types.h>
|
pthread_once_t |
Used for dynamic package initialization. |
<sys/types.h>
|
pthread_rwlock_t |
Used for read-write locks. |
<sys/types.h>
|
pthread_rwlockattr_t |
Used for read-write lock attributes. |
<sys/types.h>
|
pthread_t |
Used to identify a thread. |
<stddef.h> |
ptrdiff_t |
Signed integer type of the result of subtracting two pointers. |
<regex.h> |
regex_t |
Structure type used in regular expression matching. |
<regex.h> |
regmatch_t |
Structure type used in regular expression matching. |
<sys/resource.h> |
rlim_t |
Unsigned integer type used for limit values, to which
objects
of type int and off_t can be
cast without
loss of value. |
<semaphore.h> |
sem_t |
Type used in performing semaphore operations. |
<signal.h> |
sig_atomic_t |
Integer type of an object that can be accessed as an atomic entity, even in the presence of asynchronous interrupts. |
<signal.h> |
sigset_t |
Integer or structure type of an object used to represent sets of signals. |
<stddef.h> |
size_t |
Unsigned integer type used for size of objects. |
<termios.h> |
speed_t |
Type used for terminal baud rates. |
<sys/types.h> |
ssize_t |
Signed integer type used for a count of bytes or an error indication. |
<sys/types.h>
|
suseconds_t |
Signed integer type used for time in microseconds. |
<termios.h> |
tcflag_t |
Type used for terminal modes. |
<sys/types.h>
|
time_t |
Integer or real-floating type used for time in seconds, as defined in the ISO C standard. |
<sys/types.h>
|
timer_t |
Used for timer ID returned by the timer_create()
function. |
<sys/types.h>
|
uid_t |
Integer type used for user IDs. |
<sys/types.h>
|
useconds_t |
Unsigned integer type used for time in microseconds. |
<stdarg.h> |
va_list |
Type used for traversing variable argument lists. |
<stddef.h> |
wchar_t |
Integer type whose range of values can represent distinct codes for all members of the largest extended character set specified by the supported locales. |
<wctype.h> |
wctype_t |
Scalar type which represents a character class descriptor. |
<wchar.h> |
wint_t |
Integer type capable of storing any valid value of wchar_t
or WEOF. |
<wordexp.h> |
wordexp_t |
Structure type used in word expansion. |
|
|
standards(5). Solaris 10 conforms
to
nearly everything, and is UNIX 03 Branded. For some
utilities,
you may need to supply a full pathname to get a particular
version of
the utility adhering to a particular version of the various
standards.