[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]

Technical Reference: Base Operating System and Extensions , Volume 2


strerror Subroutine

Purpose

Maps an error number to an error message string.

Library

Standard C Library (libc.a)

Syntax

#include <string.h>


char *strerror ( ErrorNumber)
int ErrorNumber;

Description

Attention: Do not use the strerror subroutine in a multithreaded environment.

The strerror subroutine maps the error number in the ErrorNumber parameter to the error message string. The strerror subroutine retrieves an error message based on the current value of the LC_MESSAGES category. If the specified message catalog cannot be opened, the default message is returned. The returned message does not contain a new line ("\n").

Parameters


ErrorNumber Specifies the error number to be associated with the error message.

Return Values

The strerror subroutine returns a pointer to the error message.

Implementation Specifics

This subroutine is part of Base Operating System (BOS) Runtime.

Related Information

The perror subroutine.

The clearerr macro, feof macro, ferror macro, fileno macro.

Subroutines Overview in AIX 5L Version 5.1 General Programming Concepts: Writing and Debugging Programs.


[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]