libluna: Remove EFIXME and make others declare error_string() and error_name()
Closes #26.
This commit is contained in:
parent
7058ec945a
commit
052ae4902e
@ -1,4 +1,3 @@
|
||||
#define _LUNA_SYSTEM_ERROR_EXTENSIONS
|
||||
#include <luna/SystemError.h>
|
||||
#include <string.h>
|
||||
|
||||
@ -7,6 +6,8 @@ extern "C"
|
||||
// All other string functions are defined in luna/CString.cpp, so the same definitions can be used by both kernel
|
||||
// and userspace.
|
||||
|
||||
extern "C++" const char* error_string(int);
|
||||
|
||||
char* strerror(int errnum)
|
||||
{
|
||||
return const_cast<char*>(error_string(errnum));
|
||||
|
@ -1,5 +1,4 @@
|
||||
#pragma once
|
||||
#define _LUNA_SYSTEM_ERROR_EXTENSIONS
|
||||
#include <luna/Check.h>
|
||||
#include <luna/Move.h>
|
||||
#include <luna/Option.h>
|
||||
@ -7,6 +6,8 @@
|
||||
#include <luna/SystemError.h>
|
||||
#include <luna/Types.h>
|
||||
|
||||
extern const char* error_string(int error);
|
||||
|
||||
struct Error
|
||||
{
|
||||
Error(int err)
|
||||
|
@ -53,14 +53,3 @@
|
||||
#define EISCONN 106 // Transport endpoint is already connected
|
||||
#define ETIMEDOUT 110 // Connection timed out
|
||||
#define EALREADY 114 // Operation already in progress
|
||||
|
||||
#if defined(IN_MOON) || defined(USE_FREESTANDING) || defined(_LUNA_SYSTEM_ERROR_EXTENSIONS) || defined(_LUNA_SOURCE)
|
||||
// This one is Luna-specific.
|
||||
#define EFIXME 342 // Functionality not yet implemented
|
||||
|
||||
#ifndef _LUNA_SOURCE
|
||||
const char* error_string(int error);
|
||||
const char* error_name(int error);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -1,4 +1,3 @@
|
||||
#define _LUNA_SYSTEM_ERROR_EXTENSIONS
|
||||
#include <luna/SystemError.h>
|
||||
|
||||
const char* error_string(int error)
|
||||
@ -57,7 +56,6 @@ const char* error_string(int error)
|
||||
case EISCONN: return "Transport endpoint is already connected";
|
||||
case ETIMEDOUT: return "Connection timed out";
|
||||
case EALREADY: return "Operation already in progress";
|
||||
case EFIXME: return "Functionality not yet implemented";
|
||||
default: return "Unknown error";
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user