X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Fio-layer%2Fmessages.c;h=9c5bd31e06a5307d2e910290ea58cdf3a8f5f296;hb=9458e258f9de68ba5bcf4c8b278d5c50c8efdc79;hp=a5b9ce9e76da9bdbab69b0266242ec4b7712a870;hpb=6c035e225abc36a15501a03f574744824225350b;p=mono.git diff --git a/mono/io-layer/messages.c b/mono/io-layer/messages.c index a5b9ce9e76d..9c5bd31e06a 100644 --- a/mono/io-layer/messages.c +++ b/mono/io-layer/messages.c @@ -15,14 +15,14 @@ #include #include -#include #include +#include #undef DEBUG typedef struct { int id; - const char const *txt; + const char *txt; } ErrorDesc; static ErrorDesc common_messages [] = { @@ -47,6 +47,7 @@ static ErrorDesc common_messages [] = { { ERROR_PROC_NOT_FOUND, "Process not found" }, { ERROR_ALREADY_EXISTS, "Already exists" }, { ERROR_DIRECTORY, "Is a directory" }, + { ERROR_OPERATION_ABORTED, "Operation aborted" }, { ERROR_ENCRYPTION_FAILED, "Encryption failed" }, { WSAEINTR, "interrupted" }, { WSAEBADF, "Bad file number" }, @@ -290,7 +291,6 @@ static ErrorDesc messages [] = { { ERROR_PIPE_CONNECTED, "Pipe connected" }, { ERROR_PIPE_LISTENING, "Pipe listening" }, { ERROR_EA_ACCESS_DENIED, "EA access denied" }, - { ERROR_OPERATION_ABORTED, "Operation aborted" }, { ERROR_IO_INCOMPLETE, "IO incomplete" }, { ERROR_IO_PENDING, "IO pending" }, { ERROR_NOACCESS, "No access" }, @@ -1830,7 +1830,7 @@ find_msg (guint32 id, ErrorDesc *base, int n) ErrorDesc d, *result; d.id = id; - result = bsearch (&d, base, n, sizeof (ErrorDesc), msg_compare); + result = (ErrorDesc *)mono_binary_search (&d, base, n, sizeof (ErrorDesc), msg_compare); if (result == NULL) return NULL; return result->txt;