Previous Next Contents Index Doc Set Home


Implementation-Defined Behavior

B


The American National Standard for Programming Language--C, ANSI/ISO 9899-1990 defines the behavior of ANSI-conformant C. However, this standard leaves a number of issues as "implementation-defined," that is, as varying from compiler to compiler.

This chapter details these areas. They can be readily compared to the ANSI standard itself:


Translation

(2.1.1.3) Identification of diagnostics:
Error messages have the following format:

filename, line line number: message
Warning messages have the following format:

filename, line line number: warning message
Where:


Environment

(2.1.2.2.1) Semantics of arguments to main:


int main (int argc, char *argv[])
{
....
}

argc is the number of command-line arguments with which the program is invoked with. After any shell expansion, argc is always equal to at least 1, the name of the program.

argv is an array of pointers to the command-line arguments.

(2.1.2.3) What constitutes an interactive device:
An interactive device is one for which the system library call isatty() returns a nonzero value.


Identifiers

(3.1.2) The number of significant initial characters (beyond 31) in an identifier without external linkage:
The first 1,023 characters are significant. Identifiers are case-sensitive.

(3.1.2) The number of significant initial characters (beyond 6) in an identifier with external linkage:
The first 1,023 characters are significant. Identifiers are case-sensitive.


Characters

(2.2.1) The members of the source and execution character sets, except as explicitly specified in the Standard:
Both sets are identical to the ASCII character sets, plus locale-specific extensions.

(2.2.1.2) The shift states used for the encoding of multibyte characters:
There are no shift states.

(2.2.4.2.1) The number of bits in a character in the execution character set:
There are 8 bits in a character for the ASCII portion; locale-specific multiple of 8 bits for locale-specific extended portion.

(3.1.3.4) The mapping of members of the source character set (in character and string literals) to members of the execution character set:
Mapping is identical between source and execution characters.

(3.1.3.4) The value of an integer character constant that contains a character or escape sequence not represented in the basic execution character set or the extended character set for a wide character constant:
It is the numerical value of the rightmost character. For example, '\q' equals 'q'. A warning is emitted if such an escape sequence occurs.

(3.1.3.4) The value of an integer character constant that contains more than one character or a wide character constant that contains more than one multibyte character:
A multiple-character constant that is not an escape sequence has a value derived from the numeric values of each character.

(3.1.3.4) The current locale used to convert multibyte characters into corresponding wide characters (codes) for a wide character constant:
The valid locale specified by LC_ALL, LC_CTYPE, or LANG environment variable.

(3.2.1.1) Does a plain char have the same range of values as signed char or unsigned char:
A char is treated as a signed char (SPARC) (Intel).

A char is treated as an unsigned char (PowerPC).


Integers

(3.1.2.5) The representations and sets of values of the various types of integers:

Table  B-1 Representations and Sets of Values of Integers
Integer
Bits
Minimum
Maximum

char (SPARC) (Intel)

8

-128

127

char (PowerPC)

8

0

255

signed char

8

-128

127

unsigned char

8

0

255

short

16

-32768

32767

signed short

16

-32768

32767

unsigned short

16

0

65535

int

32

-2147483648

2147483647

signed int

32

-2147483648

2147483647

unsigned int

32

0

4294967295

long

32

-2147483648

2147483647

signed long

32

-2147483648

2147483647

unsigned long

32

0

4294967295

long long1

64

-9223372036854775808

9223372036854775807

signed long long1

64

-9223372036854775808

9223372036854775807

unsigned long long1

64

0

18446744073709551615

1 Not valid in -Xc mode

(3.2.1.2) The result of converting an integer to a shorter signed integer, or the result of converting an unsigned integer to a signed integer of equal length, if the value cannot be represented:
When an integer is converted to a shorter signed integer, the low order bits are copied from the longer integer to the shorter signed integer. The result may be negative.

When an unsigned integer is converted to a signed integer of equal size, the low order bits are copied from the unsigned integer to the signed integer. The result may be negative.

(3.3) The results of bitwise operations on signed integers:
The result of a bitwise operation applied to a signed type is the bitwise operation of the operands, including the sign bit. Thus, each bit in the result is set if--and only if--each of the corresponding bits in both of the operands is set.

(3.3.5) The sign of the remainder on integer division:
The result is the same sign as the dividend; thus, the remainder of -23/4 is -3.

(3.3.7) The result of a right shift of a negative-valued signed integral type:
The result of a right shift is a signed right shift.


Floating-Point

(3.1.2.5) The representations and sets of values of the various types of floating-point numbers:

Table  B-2 Values of Floating-Point Numbers  
float
Bits

32

Min

1.17549435E-38

Max

3.40282347E+38

Epsilon

1.19209290E-07

double
Bits

64

Min

2.2250738585072014E-308

Max

1.7976931348623157E+308

Epsilon

2.2204460492503131E-16

long double
Bits

128 (SPARC)(PowerPC)

80 (Intel)

Min

3.362103143112093506262677817321752603E-4932 (SPARC) (PowerPC)

3.3621031431120935062627E-4932 (Intel)

Max

1.189731495357231765085759326628007016E+4932 (SPARC) (PowerPC)

1.1897314953572317650213E4932 (Intel)

Epsilon

1.925929944387235853055977942584927319E-34 (SPARC) (PowerPC)

1.0842021724855044340075E-19 (Intel)

(3.2.1.3) The direction of truncation when an integral number is converted to a floating-point number that cannot exactly represent the original value:
Numbers are rounded to the nearest value that can be represented.

(3.2.1.4) The direction of truncation or rounding when a floating- point number is converted to a narrower floating-point number:
Numbers are rounded to the nearest value that can be represented.


Arrays and Pointers

(3.3.3.4, 4.1.1) The type of integer required to hold the maximum size of an array; that is, the type of the sizeof operator, size_t:
unsigned int as defined in stddef.h.

(3.3.4) The result of casting a pointer to an integer, or vice versa:
The bit pattern does not change for pointers and values of type int, long, unsigned int and unsigned long.

(3.3.6, 4.1.1) The type of integer required to hold the difference between two pointers to members of the same array, ptrdiff_t:
int as defined in stddef.h.


Registers

(3.5.1) The extent to which objects can actually be placed in registers by use of the register storage-class specifier:
The number of effective register declarations depends on patterns of use and definition within each function and is bounded by the number of registers available for allocation. Neither the compiler nor the optimizer is required to honor register declarations.


Structures, Unions, Enumerations, and Bit-Fields

(3.3.2.3) A member of a union object is accessed using a member of a different type:
The bit pattern stored in the union member is accessed, and the value interpreted, according to the type of the member by which it is accessed.

(3.5.2.1) The padding and alignment of members of structures.

Table  B-3 Padding and Alignment of Structure Members
Type
Alignment Boundary
Byte Alignment
char

Byte

1

short

Halfword

2

int

Word

4

long

Word

4

float

Word

4

double

Doubleword (SPARC)

Word (Intel)

8 (SPARC) (PowerPC)

4 (Intel)

long double

Doubleword (SPARC)

Word (Intel)

Quadword (PowerPC)

8 (SPARC)

4 (Intel)

16 (PowerPC)

pointer

Word

4

long long1

Doubleword (SPARC)

Word (Intel)

8 (SPARC) (PowerPC)

4 (Intel)

1 Not available in -Xc mode.

Structure members are padded internally, so that every element is aligned on the appropriate boundary.

Alignment of structures is the same as its more strictly aligned member. For example, a struct with only chars has no alignment restrictions, whereas a struct containing a double would be aligned on an 8-byte boundary.

(3.5.2.1) Whether a plain int bit-field is treated as a signed int bit-field or as an unsigned int bit-field:
It is treated as an unsigned int.

(3.5.2.1) The order of allocation of bit-fields within an int:
Bit-fields are allocated within a storage unit from high-order to low-order.

(3.5.2.1) Whether a bit-field can straddle a storage-unit boundary:
Bit-fields do not straddle storage-unit boundaries.

(3.5.2.2) The integer type chosen to represent the values of an enumeration type:
This is an int.


Qualifiers

(3.5.3) What constitutes an access to an object that has volatile-qualified type:
Each reference to the name of an object constitutes one access to the object.


Declarators

(3.5.4) The maximum number of declarators that may modify an arithmetic, structure, or union type:
No limit is imposed by the compiler.


Statements

(3.6.4.2) The maximum number of case values in a switch statement:
No limit is imposed by the compiler.


Preprocessing Directives

(3.8.1) Whether the value of a single-character character constant in a constant expression that controls conditional inclusion matches the value of the same character constant in the execution character set:
A character constant within a preprocessing directive has the same numeric value as it has within any other expression.

(3.8.1) Whether such a character constant may have a negative value:
Character constants in this context may have negative values (SPARC) (Intel) .

Character constants in this context may not have negative values (PowerPC).

(3.8.2) The method for locating includable source files:
A file whose name is delimited by < > is searched for first in the directories named by the -I option, and then in the standard directory. The standard directory is /usr/include, unless the -YI option is used to specify a different default location.

A file whose name is delimited by quotes is searched for first in the directory of the source file that contains the #include, then in directories named by the -I option, and last in the standard directory.

If a file name enclosed in < > or double quotes begins with a / character, the file name is interpreted as a path name beginning in the root directory. The search for this file begins in the root directory only.

(3.8.2) The support of quoted names for includable source files:
Quoted file names in include directives are supported.

(3.8.2) The mapping of source file character sequences:
Source file characters are mapped to their corresponding ASCII values.

(3.8.6) The behavior on each recognized #pragma directive:
The following pragmas are supported:

align integer (variable[,variable])

Makes the specified variables memory aligned to integer bytes, overriding the default. integer must be a power of 2, between 1 and 128. Valid values are: 1, 2, 4, 8, 16, 32, 64, 128. variable is a global or static variable; it cannot be a dynamic variable. If the specified alignment is smaller than the default, the default is silently used. The pragma line must appear before the declaration of the variables that it mentions; otherwise, it is ignored. Any variable that is mentioned but not declared in the text following the pragma line is ignored.

For example, the compilation and execution of the following program:

#define AL2 128
#pragma align AL2 (astruct, aint, apointer)

typedef struct {double a; long long t;} s;

int aint;
char * apointer;

main (int argc, char *argv[]) {

    static s astruct;

    printf ("align:\n");
    printf ("aint=%x mod=%x\n",&aint,((long)&aint)%AL2);
    printf ("apointer=%x mod=%x\n",&apointer,((long)&apointer)%AL2);
    printf ("astruct=%x mod=%x\n",&astruct,((long)&astruct)%AL2);
}

produces this output:

align:
aint=20900 mod=0
apointer=20980 mod=0
astruct=20880 mod=0

fini (f1[,f2...,fn])

Causes the implementation to call functions f1 to fn (finalization functions) after it calls main() routine. Such functions are expected to be of type void and to accept no arguments, and are called either when a program terminates under program control or when the containing shared object is removed from memory. As with "initialization functions," finalization functions are executed in the order processed by the link editors.

init (f1[,f2...,fn])

Causes the implementation to call functions f1 to fn (initialization functions) before it calls main() routine. Such functions are expected to be of type void and to accept no arguments, and are called while constructing the memory image of the program at the start of execution. In the case of initializers in a shared object, they are executed during the operation that brings the shared object into memory, either program startup or some dynamic loading operation, such as dlopen(). The only ordering of calls to initialization functions is the order in which they were processed by the link editors, both static and dynamic.

ident string

Places string in the .comment section of the executable.

int_to_unsigned function name

For a function that returns a type of unsigned, in -Xt or -Xs mode, changes the function return to be of type int.

MP serial_loop

(SPARC) Refer to "Serial Pragmas" on page 74 for details.

MP serial_loop_nested

(SPARC) Refer to "Serial Pragmas" on page 74 for details.

MP taskloop

(SPARC)Refer to "Parallel Pragmas" on page 74 for details.

nomemorydepend

(SPARC) This pragma specifies that for any iteration of a loop, there are no memory dependences. That is, within any iteration of a loop there are no references to the same memory. This pragma will permit the compiler (pipeliner) to schedule instructions, more effectively, within a single iteration of a loop. If any memory dependences exist within any iteration of a loop, the results of executing the program are undefined. The pragma applies to the next for loop within the current block. The compiler takes advantage of this information at optimization level of 3 or above.

no_side_effect(funcname)

(SPARC) funcname specifies the name of a function within the current translation unit. The function must be declared prior to the pragma. The pragma must be specified prior to the function's definition. For the named function, funcname, the pragma declares that the function has no side effects of any kind. The compiler can use this information when doing optimizations using the function. If the function does have side effects, the results of executing a program which calls this function are undefined. The compiler takes advantage of this information at optimization level of 3 or above.

pack (n)

Controls the layout of structure offsets. n is a number, 1, 2, or 4, that specifies the strictest alignment desired for any structure member. If n is omitted, members are aligned on their natural boundaries. If you are using #pragma pack(1), be sure to place it after all #includes.

#pragma pipeloop(n)

(SPARC) This pragma accepts a positive constant integer value, or 0, for the argument n. This pragma specifies that a loop is pipelinable and the minimum dependence distance of the loop-carried dependence is n. If the distance is 0, then the loop is effectively a Fortran-style doall loop and should be pipelined on the target processors. If the distance is greater than 0, then the compiler (pipeliner) will only try to pipeline n successive iterations. The pragma applies to the next for loop within the current block. The compiler takes advantage of this information at optimization level of 3 or above.

#pragma redefine_extname old_extname new_extname

The pragma causes every externally defined occurrence of the name "old_extname" in the object code to be "new_extname". Such that, at link time only the name "new_extname" is seen by the loader.

If pragma redefine_extname is encountered after the first use of "old_extname", as a function definition, an initializer, or an expression, the effect is undefined. (Not supported in -Xs and -Xc modes.)

unknown_control_flow (name, [,name])

Specifies a list of routines that violate the usual control flow properties of procedure calls. For example, the statement following a call to setjmp() can be reached from an arbitrary call to any other routine. The statement is reached by a call to longjmp(). Since such routines render standard flow graph analysis invalid, routines that call them cannot be safely optimized; hence, they are compiled with the optimizer disabled.

#pragma unroll (unroll_factor)

(SPARC) This pragma accepts a positive constant integer value for the argument unroll_factor. The pragma applies to the next for loop within the current block. For unroll factor other than 1, this directive serves as a suggestion to the compiler that the specified loop should be unrolled by the given factor. The compiler wil, when possible, use that unroll factor. When the unroll factor value is 1, this directive serves as a command which specifies to the compiler that the loop is not to be unrolled. The compiler takes advantage of this information at optimization level of 3 or above.

weak function_name or function_name1 = function_name2

Use #pragma weak to define a weak global symbol. This pragma is used mainly in source files for building libraries. The linker does not produce an error if it is unable to resolve a weak symbol.

#pragma weak function_name

defines function_name to be a weak symbol. The linker does not complain if it does not find a definition for function_name.

#pragma weak function_name1 = function_name2

defines function_name1 to be a weak symbol, which is an alias for the symbol function_name2.

If your program calls but does not define function_name1, the linker uses the definition from the library. However, if your program defines its own version of function_name1, then the program definition is used and the weak global definition of function_name1 in the library is not used. If the program directly calls function_name2, the definition from the library is used; a duplicate definition of function_name2 causes an error.

(3.8.8) The definitions for __DATE__ and __TIME__ when, respectively, the date and time of translation are not available:
These macros are always available from the environment.


Library Functions

(4.1.5) The null pointer constant to which the macro NULL expands:
NULL equals 0.

(4.2) The diagnostic printed by and the termination behavior of the assert function:
The diagnostic is:

Assertion failed: statement. file filename, line number
Where:

(4.3.1) The sets of characters tested for by the isalnum, isalpha, iscntrl, islower, isprint, and isupper functions:

Table  B-4 Character Sets Tested by isalpha, islower, Etc.
isalnum

ASCII characters A-Z, a-z and 0-9

isalpha

ASCII characters A-Z and a-z, plus locale-specific single-byte letters

iscntrl

ASCII characters with value 0-31 and 127

islower

ASCII characters a-z

isprint

Locale-specific single-byte printable characters

isupper

ASCII characters A-Z

(4.5.1) The values returned by the mathematics functions on domain errors:

Table  B-5 Values Returned on Domain Errors  
Error
Math Functions
Compiler Modes
-Xs, -Xt
-Xa, -Xc
DOMAIN
acos(|x|>1)
0.0
0.0
DOMAIN
asin(|x|>1)
0.0
0.0
DOMAIN
atan2(+-0,+-0)
0.0
0.0
DOMAIN 
y0(0)
-HUGE
-HUGE_VAL
DOMAIN
y0(x<0)
-HUGE
-HUGE_VAL
DOMAIN 
y1(0)
-HUGE
-HUGE_VAL
DOMAIN
y1(x<0)
-HUGE
-HUGE_VAL
DOMAIN 
yn(n,0)
-HUGE
-HUGE_VAL
DOMAIN
yn(n,x<0)
-HUGE
-HUGE_VAL
DOMAIN
log(x<0)
-HUGE
-HUGE_VAL
DOMAIN
log10(x<0)
-HUGE
-HUGE_VAL
DOMAIN
pow(0,0)
0.0
1.0 
DOMAIN
pow(0,neg)
0.0
-HUGE_VAL
DOMAIN
pow(neg,non-integal)
0.0
NaN
DOMAIN
sqrt(x<0)
0.0
NaN
DOMAIN
fmod(x,0)
x
NaN
DOMAIN
remainder(x,0)
NaN
NaN
DOMAIN
acosh(x<1)
NaN
NaN
DOMAIN
atanh(|x|>1)
NaN
NaN

(4.5.1) Whether the mathematics functions set the integer expression errno to the value of the macro ERANGE on underflow range errors:
Mathematics functions, except scalbn, set errno to ERANGE when underflow is detected.

(4.5.6.4) Whether a domain error occurs or zero is returned when the fmod function has a second argument of zero:
In this case, it returns the first argument with domain error.


Signals

(4.7.1.1) The set of signals for the signal function:
Table B-6 shows the semantics for each signal as recognized by the signal function:

Table  B-6 Semantics for signal Signals  
Signal
No.
Default
Event
SIGHUP

1

Exit

hangup

SIGINT

2

Exit

interrupt

SIGQUIT

3

Core

quit

SIGILL

4

Core

illegal instruction (not reset when caught)
SIGTRAP

5

Core

trace trap (not reset when caught)

SIGIOT

6

Core

IOT instruction

SIGABRT

6

Core

Used by abort

SIGEMT

7

Core

EMT instruction

SIGFPE

8

Core

floating point exception

SIGKILL

9

Exit

kill (cannot be caught or ignored)

SIGBUS

10

Core

bus error

SIGSEGV

11

Core

segmentation violation

SIGSYS

12

Core

bad argument to system call

SIGPIPE

13

Exit

write on a pipe with no one to read it

SIGALRM

14

Exit

alarm clock

SIGTERM

15

Exit

software termination signal from kill

SIGUSR1

16

Exit

user defined signal 1

SIGUSR2

17

Exit

user defined signal 2

SIGCLD

18

Ignore

child status change

SIGCHLD

18

Ignore

child status change alias

SIGPWR

19

Ignore

power-fail restart

SIGWINCH

20

Ignore

window size change

SIGURG

21

Ignore

urgent socket condition

SIGPOLL

22

Exit

pollable event occurred

SIGIO

22

Exit

socket I/O possible

SIGSTOP

23

Stop

stop (cannot be caught or ignored)

SIGTSTP

24

Stop

user stop requested from tty

SIGCONT

25

Ignore

stopped process has been continued

SIGTTIN

26

Stop

background tty read attempted

SIGTTOU

27

Stop

background tty write attempted

SIGVTALRM

28

Exit

virtual timer expired

SIGPROF

29

Exit

profiling timer expired

SIGXCPU

30

Core

exceeded cpu limit

SIGXFSZ

31

Core

exceeded file size limit

SIGWAITINGT

32

Ignore

process's lwps are blocked

(4.7.1.1) The default handling and the handling at program startup for each signal recognized by the signal function:
See above.

(4.7.1.1) If the equivalent of signal(sig, SIG_DFL); is not executed prior to the call of a signal handler, the blocking of the signal that is performed:
The equivalent of signal(sig,SIG_DFL) is always executed.

(4.7.1.1) Whether the default handling is reset if the SIGILL signal is received by a handler specified to the signal function:
Default handling is not reset in SIGILL.


Streams and Files

(4.9.2) Whether the last line of a text stream requires a terminating new-line character:
The last line does not need to end in a newline.

(4.9.2) Whether space characters that are written out to a text stream immediately before a new-line character appear when read in:
All characters appear when the stream is read.

(4.9.2) The number of null characters that may be appended to data written to a binary stream:
No null characters are appended to a binary stream.

(4.9.3) Whether the file position indicator of an append mode stream is initially positioned at the beginning or end of the file:
The file position indicator is initially positioned at the end of the file.

(4.9.3) Whether a write on a text stream causes the associated file to be truncated beyond that point:
A write on a text stream does not cause a file to be truncated beyond that point unless a hardware device forces it to happen.

(4.9.3) The characteristics of file buffering:
Output streams, with the exception of the standard error stream (stderr), are by default-buffered if the output refers to a file, and line-buffered if the output refers to a terminal. The standard error output stream (stderr) is by default unbuffered.

A buffered output stream saves many characters, and then writes the characters as a block. An unbuffered output stream queues information for immediate writing on the destination file or terminal immediately. Line-buffered output queues each line of output until the line is complete (a newline character is requested).

(4.9.3) Whether a zero-length file actually exists:
A zero-length file does exist since it has a directory entry.

(4.9.3) The rules for composing valid file names:
A valid file name can be from 1 to 1,023 characters in length and can use all character except the characters null and / (slash).

(4.9.3) Whether the same file can be open multiple times:
The same file can be opened multiple times.

(4.9.4.1) The effect of the remove function on an open file:
The file is deleted on the last call which closes the file. A program cannot open a file which has already been removed.

(4.9.4.2) The effect if a file with the new name exists prior to a call to the rename function:
If the file exists, it is removed and the new file is written over the previously existing file.

(4.9.6.1) The output for %p conversion in the fprintf function:
The output for %p is equivalent to %x.

(4.9.6.2) The input for %p conversion in the fscanf function:
The input for %p is equivalent to %x.

(4.9.6.2) The interpretation of a - character that is neither the first nor the last character in the scan list for %[ conversion in the fscanf function:
The - character indicates an inclusive range; thus, [0-9] is equivalent to [0123456789].


errno

(4.9.9.4) The value to which the macro errno is set by the fgetpos or ftell function on failure:
errno is set to EBADF, ESPIPE, or EINVAL on failure.

(4.9.10.4) The messages generated by the perror function:
These messages, or their translation into the language of the locale of the LC_MESSAGE category, are generated.

Table  B-7 Error Messages Generated by perror  
Number
Message
1
Not owner
2
No such file or directory
3
No such process
4
Interrupted system call
5
I/O error
6
No such device or address
7
Arg list too long
8
Exec format error
9
Bad file number
10
No child processes
11
No more processes
12
Not enough space
13
Permission denied
14
Bad address
15
Block device required
16
Device busy
17
File exists
18
Cross-device link
19
No such device
20
Not a directory
21
Is a directory
22
Invalid argument
23
File table overflow
24
Too many open files
25
Not a typewriter
26
Text file busy
27
File too large
28
No space left on device
29
Illegal seek
30
Read-only file system
31
Too many links
32
Broken pipe
33
Argument out of domain
34
Result too large
35
No message of desired type
36
Identifier removed
37
Channel number out of range
38
Level 2 not synchronized
39
Level 3 halted
40
Level 3 reset
41
Link number out of range
42
Protocol driver not attached
43
No CSI structure available
44
Level 2 halted
45
Deadlock situation detected/avoided
46
No record locks available
50
Bad exchange descriptor
51
Bad request descriptor
52
Message tables full
53
Inode table overflow
54
Bad request code
55
Invalid slot
56
File locking deadlock
57
Bad font file format
60
Not a stream device
61
No data available
62
Timer expired
63
Out of stream resources
64
Machine is not on the network
65
Package not installed
66
Object is remote
67
Link has been severed
68
Advertise error
69
Srmount error
70
Communication error on send
71
Protocol error
74
Multihop attempted
77
Not a data message
78
File name too long
79
Value too large for defined data type
80
Name not unique on network
81
File descriptor in bad state
82
Remote address changed
83
Can not access a needed shared library
84
Accessing a corrupted shared library
85
.lib section in a.out corrupted
86
Attempting to link in more shared libraries than system 
limit
87
Can not exec a shared library directly
88
Illegal byte sequence
89
Operation not applicable
90
Number of symbolic links encountered during path name 
traversal exceeds MAXSYMLINKS
93
Directory not empty
94
Too many users
95
Socket operation on non-socket
96
Destination address required
97
Message too long
98
Protocol wrong type for socket
99
Option not supported by protocol
120
Protocol not supported
121
Socket type not supported
122
Operation not supported on transport endpoint
123
Protocol family not supported
124
Address family not supported by protocol family
125
Address already in use
126
Cannot assign requested address
127
Network is down
128
Network is unreachable
129
Network dropped connection because of reset
130
Software caused connection abort
131
Connection reset by peer
132
No buffer space available
133
Transport endpoint is already connected
134
Transport endpoint is not connected
135
Structure needs cleaning
137
Not a name file
138
Not available
139
Is a name file
140
Remote I/O error
141
Reserved for future use
142
Error 142
143
Cannot send after socket shutdown
144
Too many references: cannot splice
145
Connection timed out
146
Connection refused
147
Host is down
148
No route to host
149
Operation already in progress
150
Operation now in progress
151
Stale NFS file handle


Memory

(4.10.3) The behavior of the calloc, malloc, or realloc function if the size requested is zero:
malloc and calloc return a unique pointer if the size is zero. realloc frees the object pointed to if the size is zero, and the pointer is not null.


abort Function

(4.10.4.1) The behavior of the abort function with regard to open and temporary files:
abort first closes all open files, stdio streams, directory streams, and message catalogue descriptors, if possible, and then sends the signal SIGABRT to the calling process.


exit Function

(4.10.4.3) The status returned by the exit function if the value of the argument is other than zero, EXIT_SUCCESS, or EXIT_FAILURE:
The value returned by the argument to exit.


getenv Function

(4.10.4.4) The set of environment names and the method for altering the environment list used by the getenv function:
The set of environment names provided to a program are the same as those that were in the environment when the program was executed. Any environment variable altered during program execution does not permanently change the environment variable; that is, the environment variable has the same value upon program completion as it did before the program was executed.


system Function

(4.10.4.5) The contents and mode of execution of the string by the system function:

(void) execl("/sbin/sh", "sh", (const char *)"-c", string, (char 
*)0);


strerror Function

(4.11.6.2) The contents of the error message strings returned by the strerror function:
See 4.9.10.4.


Locale Behavior

(4.12.1) The local time zone and Daylight Savings Time:
The local time zone is set by the environment variable TZ.

(4.12.2.1) The era for the clock function
The era for the clock is represented as clock ticks with the origin at the beginning of the execution of the program.

The following characteristics of a hosted environment are locale-specific:

(2.2.1) The content of the execution character set, in addition to the required members:
Locale-specific (no extension in C locale).

(2.2.2) The direction of printing:
Printing is always left to right.

(4.1.1) The decimal-point character:
Locale-specific ("." in C locale).

(4.3) The implementation-defined aspects of character testing and case mapping functions:
Same as 4.3.1.

(4.11.4.4) The collation sequence of the execution character set:
Locale-specific (ASCII collation in C locale).

(4.12.3.5) The formats for time and date:
Locale-specific. Formats for the C locale are shown in the tables below.



Table  B-8 Names of Months
January
May
September
February
June
October
March
July
November
April
August
December

The names of the months are:

The names of the days of the week are:

Table  B-9 Days and Abbreviated Days of the Week
Days
Abbreviated Days
Sunday
Thursday
Sun
Thu
Monday
Friday
Mon
Fri
Tuesday
Saturday
Tue
Sat
Wednesday

Wed

The format for time is:

%H:%M:%S
The format for date is:

%m/%d/%y
The formats for AM and PM designation are: AM PM


Previous Next Contents Index Doc Set Home