// This file is part of the Coral project.
// Please read the copyright notice in the LICENSE file.

#include <errno.h>

#include "cpp_errno.h"

namespace coral {
	int cpp_errno() {
		return errno;
	}

	std::string cpp_strerror() {
		return cpp_strerror(cpp_errno());
	}

	std::string cpp_strerror(int errnum) {
		// Problems with strerror_r... :(
		const char* res = strerror(errnum);
		return std::string(res);
	}
}
