MySQL 8.0.39
Source Code Documentation
my_winerr.cc File Reference

Convert Windows API error (GetLastError() to Posix equivalent (errno). More...

#include <errno.h>
#include <my_sys.h>
#include "my_thread_local.h"

Classes

struct  errentry
 

Macros

#define ERRTABLESIZE   (sizeof(errtable) / sizeof(errtable[0]))
 
#define MIN_EXEC_ERROR   ERROR_INVALID_STARTING_CODESEG
 
#define MAX_EXEC_ERROR   ERROR_INFLOOP_IN_RELOC_CHAIN
 
#define MIN_EACCES_RANGE   ERROR_WRITE_PROTECT
 
#define MAX_EACCES_RANGE   ERROR_SHARING_BUFFER_EXCEEDED
 

Functions

static int get_errno_from_oserr (unsigned long oserrno)
 
void my_osmaperr (unsigned long oserrno)
 

Variables

static struct errentry errtable []
 

Detailed Description

Convert Windows API error (GetLastError() to Posix equivalent (errno).

The exported function my_osmaperr() is modelled after and borrows heavily from undocumented _dosmaperr()(found of the static Microsoft C runtime).

Macro Definition Documentation

◆ ERRTABLESIZE

#define ERRTABLESIZE   (sizeof(errtable) / sizeof(errtable[0]))

◆ MAX_EACCES_RANGE

#define MAX_EACCES_RANGE   ERROR_SHARING_BUFFER_EXCEEDED

◆ MAX_EXEC_ERROR

#define MAX_EXEC_ERROR   ERROR_INFLOOP_IN_RELOC_CHAIN

◆ MIN_EACCES_RANGE

#define MIN_EACCES_RANGE   ERROR_WRITE_PROTECT

◆ MIN_EXEC_ERROR

#define MIN_EXEC_ERROR   ERROR_INVALID_STARTING_CODESEG

Function Documentation

◆ get_errno_from_oserr()

static int get_errno_from_oserr ( unsigned long  oserrno)
static

◆ my_osmaperr()

void my_osmaperr ( unsigned long  oserrno)

Variable Documentation

◆ errtable

struct errentry errtable[]
static