errno and strerror implementation on windows mobile shunt. NPODB

This commit is contained in:
Doug Turner 2008-11-03 18:52:23 +00:00
Родитель 7ecefc0b75
Коммит 6f9bf94c5d
3 изменённых файлов: 55 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,38 @@
#define EPERM 1 /* Operation not permitted */
#define ENOENT 2 /* No such file or directory */
#define ESRCH 3 /* No such process */
#define EINTR 4 /* Interrupted system call */
#define EIO 5 /* Input/output error */
#define ENXIO 6 /* Device not configured */
#define E2BIG 7 /* Argument list too long */
#define ENOEXEC 8 /* Exec format error */
#define EBADF 9 /* Bad file descriptor */
#define ECHILD 10 /* No child processes */
#define EDEADLK 11 /* Resource deadlock avoided */
#define ENOMEM 12 /* Cannot allocate memory */
#define EACCES 13 /* Permission denied */
#define EFAULT 14 /* Bad address */
#define ENOTBLK 15 /* Block device required */
#define EBUSY 16 /* Device busy */
#define EEXIST 17 /* File exists */
#define EXDEV 18 /* Cross-device link */
#define ENODEV 19 /* Operation not supported by device */
#define ENOTDIR 20 /* Not a directory */
#define EISDIR 21 /* Is a directory */
#define EINVAL 22 /* Invalid argument */
#define ENFILE 23 /* Too many open files in system */
#define EMFILE 24 /* Too many open files */
#define ENOTTY 25 /* Inappropriate ioctl for device */
#define ETXTBSY 26 /* Text file busy */
#define EFBIG 27 /* File too large */
#define ENOSPC 28 /* No space left on device */
#define ESPIPE 29 /* Illegal seek */
#define EROFS 30 /* Read-only file system */
#define EMLINK 31 /* Too many links */
#define EPIPE 32 /* Broken pipe */
#define EDOM 33 /* Numerical argument out of domain */
#define ERANGE 34 /* Result too large */
#define EAGAIN 35 /* Resource temporarily unavailable */
#define ENOTEMPTY 39 /* Directory not empty */

Просмотреть файл

@ -54,6 +54,11 @@
extern "C" {
#endif
/* errno and family */
extern MOZCE_SHUNT_API int errno;
MOZCE_SHUNT_API char* strerror(int);
/* abort */
MOZCE_SHUNT_API void abort(void);
/* Environment stuff */

Просмотреть файл

@ -193,6 +193,18 @@ MOZCE_SHUNT_API char SetEnvironmentVariableW( const unsigned short * name, const
return map_put(key,val);
}
////////////////////////////////////////////////////////
// errno
////////////////////////////////////////////////////////
MOZCE_SHUNT_API char* strerror(int inErrno)
{
return "Unknown Error";
}
MOZCE_SHUNT_API int errno = 0;
////////////////////////////////////////////////////////
// File System Stuff
////////////////////////////////////////////////////////