genode/repos/libports/src/lib/libc/libc_errno.h
2017-02-28 12:59:29 +01:00

32 lines
590 B
C++

/*
* \brief C++ wrapper over errno
* \author Christian Helmuth
* \date 2016-04-26
*/
/*
* Copyright (C) 2016-2017 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU Affero General Public License version 3.
*/
#ifndef _LIBC_ERRNO_H_
#define _LIBC_ERRNO_H_
/* libc includes */
#include <errno.h>
namespace Libc { struct Errno; }
struct Libc::Errno
{
int const error;
explicit Errno(int error) : error(error) { errno = error; }
operator int() const { return -1; }
};
#endif /* _LIBC_ERRNO_H_ */