[go: up one dir, main page]

Menu

[r92]: / trunk / util / misc.h  Maximize  Restore  History

Download this file

28 lines (22 with data), 575 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#ifndef UTIL_MISC_H
#define UTIL_MISC_H
#include <cstddef>
/**
* Gets the value of the system constant \c MAP_FAILED without provoking warnings about old C-style casts.
*
* \return \c MAP_FAILED.
*/
void *get_map_failed();
/**
* Executes the XSI version of the \c strerror_r function.
*
* \param[in] err the error code to translate.
*
* \param[in] buf the buffer in which to store the message.
*
* \param[in] buflen the length of the buffer.
*
* \return 0 on success, or -1 on failure.
*/
int xsi_strerror_r(int err, char *buf, std::size_t buflen);
#endif