summaryrefslogtreecommitdiffstats
path: root/win/tclWinPort.h
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2002-05-28 09:12:25 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2002-05-28 09:12:25 (GMT)
commit76bb596c507cba4c6e632707f229a29dae364dde (patch)
treec21bfb0f11043099feb0263683823496f00972ce /win/tclWinPort.h
parent35a21d3c687e7f7883d393c30df87820c1879e51 (diff)
downloadtcl-76bb596c507cba4c6e632707f229a29dae364dde.zip
tcl-76bb596c507cba4c6e632707f229a29dae364dde.tar.gz
tcl-76bb596c507cba4c6e632707f229a29dae364dde.tar.bz2
D'oh! Accidentally made this file uncompilable. Added some extra
commenting as part of fixing process.
Diffstat (limited to 'win/tclWinPort.h')
-rw-r--r--win/tclWinPort.h124
1 files changed, 65 insertions, 59 deletions
diff --git a/win/tclWinPort.h b/win/tclWinPort.h
index baf38fb..72f993f 100644
--- a/win/tclWinPort.h
+++ b/win/tclWinPort.h
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclWinPort.h,v 1.29 2002/05/27 10:14:21 dkf Exp $
+ * RCS: @(#) $Id: tclWinPort.h,v 1.30 2002/05/28 09:12:25 dkf Exp $
*/
#ifndef _TCLWINPORT
@@ -27,7 +27,7 @@
typedef float *_TCHAR;
# define _TCHAR_DEFINED
typedef float *TCHAR;
-#endif
+#endif /* CHECK_UNICODE_CALLS */
/*
*---------------------------------------------------------------------------
@@ -60,8 +60,8 @@
# include <utime.h>
# else
# include <sys/utime.h>
-# endif
-#endif
+# endif /* __BORLANDC__ */
+#endif /* __MWERKS__ */
#include <time.h>
@@ -74,14 +74,14 @@
#ifdef BUILD_tcl
# undef TCL_STORAGE_CLASS
# define TCL_STORAGE_CLASS DLLEXPORT
-#endif
+#endif /* BUILD_tcl */
/*
* Define EINPROGRESS in terms of WSAEINPROGRESS.
*/
#ifndef EINPROGRESS
-#define EINPROGRESS WSAEINPROGRESS
+# define EINPROGRESS WSAEINPROGRESS
#endif
/*
@@ -89,7 +89,7 @@
*/
#ifndef ENOTSUP
-#define ENOTSUP -1030507
+# define ENOTSUP -1030507
#endif
/*
@@ -98,115 +98,121 @@
*/
#ifndef EWOULDBLOCK
-#define EWOULDBLOCK EAGAIN
+# define EWOULDBLOCK EAGAIN
#endif
#ifndef EALREADY
-#define EALREADY 149 /* operation already in progress */
+# define EALREADY 149 /* operation already in progress */
#endif
#ifndef ENOTSOCK
-#define ENOTSOCK 95 /* Socket operation on non-socket */
+# define ENOTSOCK 95 /* Socket operation on non-socket */
#endif
#ifndef EDESTADDRREQ
-#define EDESTADDRREQ 96 /* Destination address required */
+# define EDESTADDRREQ 96 /* Destination address required */
#endif
#ifndef EMSGSIZE
-#define EMSGSIZE 97 /* Message too long */
+# define EMSGSIZE 97 /* Message too long */
#endif
#ifndef EPROTOTYPE
-#define EPROTOTYPE 98 /* Protocol wrong type for socket */
+# define EPROTOTYPE 98 /* Protocol wrong type for socket */
#endif
#ifndef ENOPROTOOPT
-#define ENOPROTOOPT 99 /* Protocol not available */
+# define ENOPROTOOPT 99 /* Protocol not available */
#endif
#ifndef EPROTONOSUPPORT
-#define EPROTONOSUPPORT 120 /* Protocol not supported */
+# define EPROTONOSUPPORT 120 /* Protocol not supported */
#endif
#ifndef ESOCKTNOSUPPORT
-#define ESOCKTNOSUPPORT 121 /* Socket type not supported */
+# define ESOCKTNOSUPPORT 121 /* Socket type not supported */
#endif
#ifndef EOPNOTSUPP
-#define EOPNOTSUPP 122 /* Operation not supported on socket */
+# define EOPNOTSUPP 122 /* Operation not supported on socket */
#endif
#ifndef EPFNOSUPPORT
-#define EPFNOSUPPORT 123 /* Protocol family not supported */
+# define EPFNOSUPPORT 123 /* Protocol family not supported */
#endif
#ifndef EAFNOSUPPORT
-#define EAFNOSUPPORT 124 /* Address family not supported */
+# define EAFNOSUPPORT 124 /* Address family not supported */
#endif
#ifndef EADDRINUSE
-#define EADDRINUSE 125 /* Address already in use */
+# define EADDRINUSE 125 /* Address already in use */
#endif
#ifndef EADDRNOTAVAIL
-#define EADDRNOTAVAIL 126 /* Can't assign requested address */
+# define EADDRNOTAVAIL 126 /* Can't assign requested address */
#endif
#ifndef ENETDOWN
-#define ENETDOWN 127 /* Network is down */
+# define ENETDOWN 127 /* Network is down */
#endif
#ifndef ENETUNREACH
-#define ENETUNREACH 128 /* Network is unreachable */
+# define ENETUNREACH 128 /* Network is unreachable */
#endif
#ifndef ENETRESET
-#define ENETRESET 129 /* Network dropped connection on reset */
+# define ENETRESET 129 /* Network dropped connection on reset */
#endif
#ifndef ECONNABORTED
-#define ECONNABORTED 130 /* Software caused connection abort */
+# define ECONNABORTED 130 /* Software caused connection abort */
#endif
#ifndef ECONNRESET
-#define ECONNRESET 131 /* Connection reset by peer */
+# define ECONNRESET 131 /* Connection reset by peer */
#endif
#ifndef ENOBUFS
-#define ENOBUFS 132 /* No buffer space available */
+# define ENOBUFS 132 /* No buffer space available */
#endif
#ifndef EISCONN
-#define EISCONN 133 /* Socket is already connected */
+# define EISCONN 133 /* Socket is already connected */
#endif
#ifndef ENOTCONN
-#define ENOTCONN 134 /* Socket is not connected */
+# define ENOTCONN 134 /* Socket is not connected */
#endif
#ifndef ESHUTDOWN
-#define ESHUTDOWN 143 /* Can't send after socket shutdown */
+# define ESHUTDOWN 143 /* Can't send after socket shutdown */
#endif
#ifndef ETOOMANYREFS
-#define ETOOMANYREFS 144 /* Too many references: can't splice */
+# define ETOOMANYREFS 144 /* Too many references: can't splice */
#endif
#ifndef ETIMEDOUT
-#define ETIMEDOUT 145 /* Connection timed out */
+# define ETIMEDOUT 145 /* Connection timed out */
#endif
#ifndef ECONNREFUSED
-#define ECONNREFUSED 146 /* Connection refused */
+# define ECONNREFUSED 146 /* Connection refused */
#endif
#ifndef ELOOP
-#define ELOOP 90 /* Symbolic link loop */
+# define ELOOP 90 /* Symbolic link loop */
#endif
#ifndef EHOSTDOWN
-#define EHOSTDOWN 147 /* Host is down */
+# define EHOSTDOWN 147 /* Host is down */
#endif
#ifndef EHOSTUNREACH
-#define EHOSTUNREACH 148 /* No route to host */
+# define EHOSTUNREACH 148 /* No route to host */
#endif
#ifndef ENOTEMPTY
-#define ENOTEMPTY 93 /* directory not empty */
+# define ENOTEMPTY 93 /* directory not empty */
#endif
#ifndef EUSERS
-#define EUSERS 94 /* Too many users (for UFS) */
+# define EUSERS 94 /* Too many users (for UFS) */
#endif
#ifndef EDQUOT
-#define EDQUOT 69 /* Disc quota exceeded */
+# define EDQUOT 69 /* Disc quota exceeded */
#endif
#ifndef ESTALE
-#define ESTALE 151 /* Stale NFS file handle */
+# define ESTALE 151 /* Stale NFS file handle */
#endif
#ifndef EREMOTE
-#define EREMOTE 66 /* The object is remote */
+# define EREMOTE 66 /* The object is remote */
#endif
+
+/*
+ * It is very hard to determine how Windows reacts to attempting to
+ * set a file pointer outside the input datatype's representable
+ * region. So we fake the error code ourselves.
+ */
+
#ifndef EOVERFLOW
-#ifdef
-#define EOVERFLOW EFBIG /* The object couldn't fit in the datatype */
-#else
-#define EOVERFLOW EINVAL /* Better than nothing! */
-#endif
-#endif
-#endif
+# ifdef EFBIG
+# define EOVERFLOW EFBIG /* The object couldn't fit in the datatype */
+# else /* !EFBIG */
+# define EOVERFLOW EINVAL /* Better than nothing! */
+# endif /* EFBIG */
+#endif /* !EOVERFLOW */
/*
* Supply definitions for macros to query wait status, if not already
@@ -217,7 +223,7 @@
# define WAIT_STATUS_TYPE union wait
#else
# define WAIT_STATUS_TYPE int
-#endif
+#endif /* TCL_UNION_WAIT */
#ifndef WIFEXITED
# define WIFEXITED(stat) (((*((int *) &(stat))) & 0xff) == 0)
@@ -283,35 +289,35 @@
# else
# define S_ISREG(m) 0
# endif
-# endif
+#endif /* !S_ISREG */
#ifndef S_ISDIR
# ifdef S_IFDIR
# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
# else
# define S_ISDIR(m) 0
# endif
-# endif
+#endif /* !S_ISDIR */
#ifndef S_ISCHR
# ifdef S_IFCHR
# define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
# else
# define S_ISCHR(m) 0
# endif
-# endif
+#endif /* !S_ISCHR */
#ifndef S_ISBLK
# ifdef S_IFBLK
# define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
# else
# define S_ISBLK(m) 0
# endif
-# endif
+#endif /* !S_ISBLK */
#ifndef S_ISFIFO
# ifdef S_IFIFO
# define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
# else
# define S_ISFIFO(m) 0
# endif
-# endif
+#endif /* !S_ISFIFO */
/*
* Define MAXPATHLEN in terms of MAXPATH if available
@@ -331,10 +337,10 @@
#if ! TCL_PID_T
# define pid_t int
-#endif
+#endif /* !TCL_PID_T */
#if ! TCL_UID_T
# define uid_t int
-#endif
+#endif /* !TCL_UID_T */
/*
* Visual C++ has some odd names for common functions, so we need to
@@ -359,7 +365,7 @@
#ifdef __BORLANDC__
# define timezone _timezone
# define environ _environ
-#endif
+#endif /* __BORLANDC__ */
#ifdef __CYGWIN__
/* On cygwin32, the environment is imported from the cygwin32 DLL. */
@@ -469,7 +475,7 @@ typedef CRITICAL_SECTION TclpMutex;
EXTERN void TclpMutexInit _ANSI_ARGS_((TclpMutex *mPtr));
EXTERN void TclpMutexLock _ANSI_ARGS_((TclpMutex *mPtr));
EXTERN void TclpMutexUnlock _ANSI_ARGS_((TclpMutex *mPtr));
-#else
+#else /* !TCL_THREADS */
typedef int TclpMutex;
#define TclpMutexInit(a)
#define TclpMutexLock(a)
@@ -485,7 +491,7 @@ EXTERN Tcl_WideUInt strtoull _ANSI_ARGS_((CONST char *string,
#ifndef INVALID_SET_FILE_POINTER
#define INVALID_SET_FILE_POINTER 0xFFFFFFFF
-#endif
+#endif /* INVALID_SET_FILE_POINTER */
#include "tclPlatDecls.h"
#include "tclIntPlatDecls.h"