~ubuntu-branches/ubuntu/feisty/clamav/feisty

« back to all changes in this revision

Viewing changes to win32/3rdparty/pthreads/need_errno.h

  • Committer: Bazaar Package Importer
  • Author(s): Kees Cook
  • Date: 2007-02-20 10:33:44 UTC
  • mto: This revision was merged to the branch mainline in revision 16.
  • Revision ID: james.westby@ubuntu.com-20070220103344-zgcu2psnx9d98fpa
Tags: upstream-0.90
ImportĀ upstreamĀ versionĀ 0.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/***
2
 
* errno.h - system wide error numbers (set by system calls)
3
 
*
4
 
*       Copyright (c) 1985-1997, Microsoft Corporation. All rights reserved.
5
 
*
6
 
* Purpose:
7
 
*       This file defines the system-wide error numbers (set by
8
 
*       system calls).  Conforms to the XENIX standard.  Extended
9
 
*       for compatibility with Uniforum standard.
10
 
*       [System V]
11
 
*
12
 
*       [Public]
13
 
*
14
 
****/
15
 
 
16
 
#if     _MSC_VER > 1000
17
 
#pragma once
18
 
#endif
19
 
 
20
 
#ifndef _INC_ERRNO
21
 
#define _INC_ERRNO
22
 
 
23
 
#if     !defined(_WIN32) && !defined(_MAC)
24
 
#error ERROR: Only Mac or Win32 targets supported!
25
 
#endif
26
 
 
27
 
#include <winsock.h>
28
 
 
29
 
#ifdef  __cplusplus
30
 
extern "C" {
31
 
#endif
32
 
 
33
 
 
34
 
 
35
 
/* Define _CRTIMP */
36
 
 
37
 
#ifndef _CRTIMP
38
 
#ifdef  _DLL
39
 
#define _CRTIMP __declspec(dllimport)
40
 
#else   /* ndef _DLL */
41
 
#define _CRTIMP
42
 
#endif  /* _DLL */
43
 
#endif  /* _CRTIMP */
44
 
 
45
 
 
46
 
/* Define __cdecl for non-Microsoft compilers */
47
 
 
48
 
#if     ( !defined(_MSC_VER) && !defined(__cdecl) )
49
 
#define __cdecl
50
 
#endif
51
 
 
52
 
/* Define _CRTAPI1 (for compatibility with the NT SDK) */
53
 
 
54
 
#ifndef _CRTAPI1
55
 
#if     _MSC_VER >= 800 && _M_IX86 >= 300
56
 
#define _CRTAPI1 __cdecl
57
 
#else
58
 
#define _CRTAPI1
59
 
#endif
60
 
#endif
61
 
 
62
 
/* declare reference to errno */
63
 
#ifndef PTW32_STATIC_LIB
64
 
#  ifdef PTW32_BUILD
65
 
#    define PTW32_DLLPORT __declspec (dllexport)
66
 
#  else
67
 
#    define PTW32_DLLPORT __declspec (dllimport)
68
 
#  endif
69
 
#else
70
 
#  define PTW32_DLLPORT
71
 
#endif
72
 
 
73
 
/* declare reference to errno */
74
 
 
75
 
#if     (defined(_MT) || defined(_MD) || defined(_DLL)) && !defined(_MAC)
76
 
PTW32_DLLPORT int * __cdecl _errno(void);
77
 
#define errno   (*_errno())
78
 
#else   /* ndef _MT && ndef _MD && ndef _DLL */
79
 
_CRTIMP extern int errno;
80
 
#endif  /* _MT || _MD || _DLL */
81
 
 
82
 
/* Error Codes */
83
 
 
84
 
#define EPERM           1
85
 
#define ENOENT          2
86
 
#define ESRCH           3
87
 
#define EINTR           4
88
 
#define EIO             5
89
 
#define ENXIO           6
90
 
#define E2BIG           7
91
 
#define ENOEXEC         8
92
 
#define EBADF           9
93
 
#define ECHILD          10
94
 
#define EAGAIN          11
95
 
#define ENOMEM          12
96
 
#define EACCES          13
97
 
#define EFAULT          14
98
 
#define EBUSY           16
99
 
#define EEXIST          17
100
 
#define EXDEV           18
101
 
#define ENODEV          19
102
 
#define ENOTDIR         20
103
 
#define EISDIR          21
104
 
#define EINVAL          22
105
 
#define ENFILE          23
106
 
#define EMFILE          24
107
 
#define ENOTTY          25
108
 
#define EFBIG           27
109
 
#define ENOSPC          28
110
 
#define ESPIPE          29
111
 
#define EROFS           30
112
 
#define EMLINK          31
113
 
#define EPIPE           32
114
 
#define EDOM            33
115
 
#define ERANGE          34
116
 
#define EDEADLK         36
117
 
 
118
 
/* defined differently in winsock.h on WinCE */
119
 
#ifndef ENAMETOOLONG
120
 
#define ENAMETOOLONG    38
121
 
#endif
122
 
 
123
 
#define ENOLCK          39
124
 
#define ENOSYS          40
125
 
 
126
 
/* defined differently in winsock.h on WinCE */
127
 
#ifndef ENOTEMPTY
128
 
#define ENOTEMPTY       41
129
 
#endif
130
 
 
131
 
#define EILSEQ          42
132
 
 
133
 
/*
134
 
 * Support EDEADLOCK for compatibiity with older MS-C versions.
135
 
 */
136
 
#define EDEADLOCK       EDEADLK
137
 
 
138
 
#ifdef  __cplusplus
139
 
}
140
 
#endif
141
 
 
142
 
#endif  /* _INC_ERRNO */