~ubuntu-branches/ubuntu/raring/tcl8.5/raring

« back to all changes in this revision

Viewing changes to win/tclWinPort.h

  • Committer: Package Import Robot
  • Author(s): Colin Watson
  • Date: 2011-12-20 18:16:54 UTC
  • mfrom: (11.2.3 sid)
  • Revision ID: package-import@ubuntu.com-20111220181654-ucrvquqz66e1dv80
Tags: 8.5.11-1ubuntu1
* Resynchronise with Debian.  Remaining changes:
  - Don't use tcl itself to install things when building, to allow for
    cross-building.

Show diffs side-by-side

added added

removed removed

Lines of Context:
92
92
 * Define EINPROGRESS in terms of WSAEINPROGRESS.
93
93
 */
94
94
 
95
 
#ifndef EINPROGRESS
96
 
#   define EINPROGRESS  WSAEINPROGRESS
97
 
#endif
 
95
#undef  EINPROGRESS
 
96
#define EINPROGRESS     WSAEINPROGRESS
98
97
 
99
98
/*
100
 
 * If ENOTSUP is not defined, define it to a value that will never occur.
 
99
 * Define ENOTSUP to a value that will never occur.
101
100
 */
102
101
 
103
 
#ifndef ENOTSUP
104
 
#   define ENOTSUP      -1030507
105
 
#endif
 
102
#undef ENOTSUP
 
103
#define ENOTSUP -1030507
106
104
 
107
105
/*
108
106
 * Not all mingw32 versions have this struct.
109
107
 */
110
 
#if !defined(__BORLANDC__) && !defined(_MSC_VER) && !defined(_WIN64) && !defined(HAVE_STRUCT_STAT32I64)
 
108
#if !defined(__BORLANDC__) && !defined(_MSC_VER) && !defined(_WIN64) && defined(HAVE_NO_STRUCT_STAT32I64)
111
109
  struct _stat32i64 {
112
110
    dev_t st_dev;
113
111
    ino_t st_ino;
129
127
  };
130
128
#endif
131
129
 
 
130
/* Those codes, from Visual Studio 2010, conflict with other values */
 
131
#undef ENODATA
 
132
#undef ENOMSG
 
133
#undef ENOSR
 
134
#undef ENOSTR
 
135
#undef EPROTO
 
136
 
132
137
/*
133
138
 * The following defines redefine the Windows Socket errors as
134
139
 * BSD errors so Tcl_PosixError can do the right thing.
135
140
 */
136
141
 
137
 
#ifndef EWOULDBLOCK
138
 
#   define EWOULDBLOCK  EAGAIN
139
 
#endif
140
 
#ifndef EALREADY
141
 
#   define EALREADY     149     /* operation already in progress */
142
 
#endif
143
 
#ifndef ENOTSOCK
144
 
#   define ENOTSOCK     95      /* Socket operation on non-socket */
145
 
#endif
146
 
#ifndef EDESTADDRREQ
147
 
#   define EDESTADDRREQ 96      /* Destination address required */
148
 
#endif
149
 
#ifndef EMSGSIZE
150
 
#   define EMSGSIZE     97      /* Message too long */
151
 
#endif
152
 
#ifndef EPROTOTYPE
153
 
#   define EPROTOTYPE   98      /* Protocol wrong type for socket */
154
 
#endif
155
 
#ifndef ENOPROTOOPT
156
 
#   define ENOPROTOOPT  99      /* Protocol not available */
157
 
#endif
158
 
#ifndef EPROTONOSUPPORT
159
 
#   define EPROTONOSUPPORT 120  /* Protocol not supported */
160
 
#endif
161
 
#ifndef ESOCKTNOSUPPORT
162
 
#   define ESOCKTNOSUPPORT 121  /* Socket type not supported */
163
 
#endif
164
 
#ifndef EOPNOTSUPP
165
 
#   define EOPNOTSUPP   122     /* Operation not supported on socket */
166
 
#endif
167
 
#ifndef EPFNOSUPPORT
168
 
#   define EPFNOSUPPORT 123     /* Protocol family not supported */
169
 
#endif
170
 
#ifndef EAFNOSUPPORT
171
 
#   define EAFNOSUPPORT 124     /* Address family not supported */
172
 
#endif
173
 
#ifndef EADDRINUSE
174
 
#   define EADDRINUSE   125     /* Address already in use */
175
 
#endif
176
 
#ifndef EADDRNOTAVAIL
177
 
#   define EADDRNOTAVAIL 126    /* Can't assign requested address */
178
 
#endif
179
 
#ifndef ENETDOWN
180
 
#   define ENETDOWN     127     /* Network is down */
181
 
#endif
182
 
#ifndef ENETUNREACH
183
 
#   define ENETUNREACH  128     /* Network is unreachable */
184
 
#endif
185
 
#ifndef ENETRESET
186
 
#   define ENETRESET    129     /* Network dropped connection on reset */
187
 
#endif
188
 
#ifndef ECONNABORTED
189
 
#   define ECONNABORTED 130     /* Software caused connection abort */
190
 
#endif
191
 
#ifndef ECONNRESET
192
 
#   define ECONNRESET   131     /* Connection reset by peer */
193
 
#endif
194
 
#ifndef ENOBUFS
195
 
#   define ENOBUFS      132     /* No buffer space available */
196
 
#endif
197
 
#ifndef EISCONN
198
 
#   define EISCONN      133     /* Socket is already connected */
199
 
#endif
200
 
#ifndef ENOTCONN
201
 
#   define ENOTCONN     134     /* Socket is not connected */
202
 
#endif
203
 
#ifndef ESHUTDOWN
204
 
#   define ESHUTDOWN    143     /* Can't send after socket shutdown */
205
 
#endif
206
 
#ifndef ETOOMANYREFS
207
 
#   define ETOOMANYREFS 144     /* Too many references: can't splice */
208
 
#endif
209
 
#ifndef ETIMEDOUT
210
 
#   define ETIMEDOUT    145     /* Connection timed out */
211
 
#endif
212
 
#ifndef ECONNREFUSED
213
 
#   define ECONNREFUSED 146     /* Connection refused */
214
 
#endif
215
 
#ifndef ELOOP
216
 
#   define ELOOP        90      /* Symbolic link loop */
217
 
#endif
218
 
#ifndef EHOSTDOWN
219
 
#   define EHOSTDOWN    147     /* Host is down */
220
 
#endif
221
 
#ifndef EHOSTUNREACH
222
 
#   define EHOSTUNREACH 148     /* No route to host */
223
 
#endif
224
 
#ifndef ENOTEMPTY
225
 
#   define ENOTEMPTY    93      /* directory not empty */
226
 
#endif
227
 
#ifndef EUSERS
228
 
#   define EUSERS       94      /* Too many users (for UFS) */
229
 
#endif
230
 
#ifndef EDQUOT
231
 
#   define EDQUOT       69      /* Disc quota exceeded */
232
 
#endif
233
 
#ifndef ESTALE
234
 
#   define ESTALE       151     /* Stale NFS file handle */
235
 
#endif
236
 
#ifndef EREMOTE
237
 
#   define EREMOTE      66      /* The object is remote */
238
 
#endif
 
142
#undef EWOULDBLOCK
 
143
#define EWOULDBLOCK     EAGAIN
 
144
#undef EALREADY
 
145
#define EALREADY        149     /* operation already in progress */
 
146
#undef ENOTSOCK
 
147
#define ENOTSOCK        95      /* Socket operation on non-socket */
 
148
#undef EDESTADDRREQ
 
149
#define EDESTADDRREQ    96      /* Destination address required */
 
150
#undef EMSGSIZE
 
151
#define EMSGSIZE        97      /* Message too long */
 
152
#undef EPROTOTYPE
 
153
#define EPROTOTYPE      98      /* Protocol wrong type for socket */
 
154
#undef ENOPROTOOPT
 
155
#define ENOPROTOOPT     99      /* Protocol not available */
 
156
#undef EPROTONOSUPPORT
 
157
#define EPROTONOSUPPORT 120     /* Protocol not supported */
 
158
#undef ESOCKTNOSUPPORT
 
159
#define ESOCKTNOSUPPORT 121     /* Socket type not supported */
 
160
#undef EOPNOTSUPP
 
161
#define EOPNOTSUPP      122     /* Operation not supported on socket */
 
162
#undef EPFNOSUPPORT
 
163
#define EPFNOSUPPORT    123     /* Protocol family not supported */
 
164
#undef EAFNOSUPPORT
 
165
#define EAFNOSUPPORT    124     /* Address family not supported */
 
166
#undef EADDRINUSE
 
167
#define EADDRINUSE      125     /* Address already in use */
 
168
#undef EADDRNOTAVAIL
 
169
#define EADDRNOTAVAIL 126       /* Can't assign requested address */
 
170
#undef ENETDOWN
 
171
#define ENETDOWN        127     /* Network is down */
 
172
#undef ENETUNREACH
 
173
#define ENETUNREACH     128     /* Network is unreachable */
 
174
#undef ENETRESET
 
175
#define ENETRESET       129     /* Network dropped connection on reset */
 
176
#undef ECONNABORTED
 
177
#define ECONNABORTED    130     /* Software caused connection abort */
 
178
#undef ECONNRESET
 
179
#define ECONNRESET      131     /* Connection reset by peer */
 
180
#undef ENOBUFS
 
181
#define ENOBUFS 132     /* No buffer space available */
 
182
#undef EISCONN
 
183
#define EISCONN 133     /* Socket is already connected */
 
184
#undef ENOTCONN
 
185
#define ENOTCONN        134     /* Socket is not connected */
 
186
#undef ESHUTDOWN
 
187
#define ESHUTDOWN       143     /* Can't send after socket shutdown */
 
188
#undef ETOOMANYREFS
 
189
#define ETOOMANYREFS    144     /* Too many references: can't splice */
 
190
#undef ETIMEDOUT
 
191
#define ETIMEDOUT       145     /* Connection timed out */
 
192
#undef ECONNREFUSED
 
193
#define ECONNREFUSED    146     /* Connection refused */
 
194
#undef ELOOP
 
195
#define ELOOP   90      /* Symbolic link loop */
 
196
#undef EHOSTDOWN
 
197
#define EHOSTDOWN       147     /* Host is down */
 
198
#undef EHOSTUNREACH
 
199
#define EHOSTUNREACH    148     /* No route to host */
 
200
#undef ENOTEMPTY
 
201
#define ENOTEMPTY       93      /* directory not empty */
 
202
#undef EUSERS
 
203
#define EUSERS  94      /* Too many users (for UFS) */
 
204
#undef EDQUOT
 
205
#define EDQUOT  69      /* Disc quota exceeded */
 
206
#undef ESTALE
 
207
#define ESTALE  151     /* Stale NFS file handle */
 
208
#undef EREMOTE
 
209
#define EREMOTE 66      /* The object is remote */
239
210
 
240
211
/*
241
212
 * It is very hard to determine how Windows reacts to attempting to
243
214
 * region.  So we fake the error code ourselves.
244
215
 */
245
216
 
246
 
#ifndef EOVERFLOW
247
 
#   ifdef EFBIG
248
 
#      define EOVERFLOW EFBIG   /* The object couldn't fit in the datatype */
249
 
#   else /* !EFBIG */
250
 
#      define EOVERFLOW EINVAL  /* Better than nothing! */
251
 
#   endif /* EFBIG */
252
 
#endif /* !EOVERFLOW */
 
217
#undef EOVERFLOW
 
218
#define EOVERFLOW       EFBIG   /* The object couldn't fit in the datatype */
253
219
 
254
220
/*
255
221
 * Signals not known to the standard ANSI signal.h.  These are used
411
377
 
412
378
#if defined(_MSC_VER) || defined(__MINGW32__)
413
379
#   define environ _environ
414
 
#   define hypot _hypot
 
380
#    if defined(_MSC_VER) && (_MSC_VER < 1600)
 
381
#       define hypot _hypot
 
382
#    endif
415
383
#   define exception _exception
416
384
#   undef EDEADLOCK
417
385
#   if defined(__MINGW32__) && !defined(__MSVCRT__)