Keil Logo Arm Logo

C and C++ Libraries and Floating-Point Support Reference

errno

errno

The C library errno variable is defined in the implicit static data area of the library. This area is identified by __user_libspace(). The function that returns the address of errno is:

(*(volatile int *) __aeabi_errno_addr())

You can define __aeabi_errno_addr() if you want to place errno at a user-defined location instead of the default location identified by __user_libspace().

Note

Legacy versions of errno.h might define errno in terms of __rt_errno_addr() rather than __aeabi_errno_addr(). The function name __rt_errno_addr() is a legacy from pre-ABI versions of the tools, and is still supported to ensure that object files generated with those tools link successfully.

Show/hideReturns

The return value is a pointer to a variable of type int, containing the currently applicable instance of errno.

Copyright © 2011-2012 ARM. All rights reserved.ARM DUI 0589B
Non-ConfidentialID062912

Keil logo

Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.