diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2002-05-27 10:14:21 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2002-05-27 10:14:21 (GMT) |
commit | 35a21d3c687e7f7883d393c30df87820c1879e51 (patch) | |
tree | 7d7c17d8e654bdce47d465b5cfa89196682af8c5 | |
parent | eff506b0846210f74d3905c974729e4e832f0fe0 (diff) | |
download | tcl-35a21d3c687e7f7883d393c30df87820c1879e51.zip tcl-35a21d3c687e7f7883d393c30df87820c1879e51.tar.gz tcl-35a21d3c687e7f7883d393c30df87820c1879e51.tar.bz2 |
Better handling of EOVERFLOW on Win32 systems (as EFBIG or EINVAL.)
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | generic/tclPosixStr.c | 6 | ||||
-rw-r--r-- | win/tclWinError.c | 4 | ||||
-rw-r--r-- | win/tclWinPort.h | 12 |
4 files changed, 21 insertions, 10 deletions
@@ -1,3 +1,12 @@ +2002-05-27 Donal K. Fellows <fellowsd@cs.man.ac.uk> + + * win/tclWinError.c: Added comment on conversion of + ERROR_NEGATIVE_SEEK because that is a mapping that really belongs, + and not a catch-all case. + * win/tclWinPort.h (EOVERFLOW): Should be either EFBIG or EINVAL + * generic/tclPosixStr.c (Tcl_ErrnoId, Tcl_ErrnoMsg): EOVERFLOW can + potentially be a synonym for EINVAL. + 2002-05-24 Donal K. Fellows <fellowsd@cs.man.ac.uk> === Changes due to TIP#91 === diff --git a/generic/tclPosixStr.c b/generic/tclPosixStr.c index 2dbe357..cc2a546 100644 --- a/generic/tclPosixStr.c +++ b/generic/tclPosixStr.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclPosixStr.c,v 1.8 2002/02/15 23:42:12 kennykb Exp $ + * RCS: @(#) $Id: tclPosixStr.c,v 1.9 2002/05/27 10:14:21 dkf Exp $ */ #include "tclInt.h" @@ -339,7 +339,7 @@ Tcl_ErrnoId() #if defined(EOPNOTSUPP) && (!defined(ENOTSUP) || (ENOTSUP != EOPNOTSUPP)) case EOPNOTSUPP: return "EOPNOTSUPP"; #endif -#if defined(EOVERFLOW) && ( !defined(EFBIG) || (EOVERFLOW != EFBIG) ) +#if defined(EOVERFLOW) && ( !defined(EFBIG) || (EOVERFLOW != EFBIG) ) && ( !defined(EINVAL) || (EOVERFLOW != EINVAL) ) case EOVERFLOW: return "EOVERFLOW"; #endif #ifdef EPERM @@ -789,7 +789,7 @@ Tcl_ErrnoMsg(err) #if defined(EOPNOTSUPP) && (!defined(ENOTSUP) || (ENOTSUP != EOPNOTSUPP)) case EOPNOTSUPP: return "operation not supported on socket"; #endif -#if defined(EOVERFLOW) && ( !defined(EFBIG) || (EOVERFLOW != EFBIG) ) +#if defined(EOVERFLOW) && ( !defined(EFBIG) || (EOVERFLOW != EFBIG) ) && ( !defined(EINVAL) || (EOVERFLOW != EINVAL) ) case EOVERFLOW: return "file too big"; #endif #ifdef EPERM diff --git a/win/tclWinError.c b/win/tclWinError.c index 1bc66cd..e70e1c2 100644 --- a/win/tclWinError.c +++ b/win/tclWinError.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinError.c,v 1.4 2000/09/06 22:37:24 hobbs Exp $ + * RCS: @(#) $Id: tclWinError.c,v 1.5 2002/05/27 10:14:21 dkf Exp $ */ #include "tclWinInt.h" @@ -151,7 +151,7 @@ static char errorTable[] = { ECHILD, /* ERROR_WAIT_NO_CHILDREN 128 */ ECHILD, /* ERROR_CHILD_NOT_COMPLETE 129 */ EBADF, /* ERROR_DIRECT_ACCESS_HANDLE 130 */ - EINVAL, /* 131 */ + EINVAL, /* ERROR_NEGATIVE_SEEK 131 */ ESPIPE, /* ERROR_SEEK_ON_DEVICE 132 */ EINVAL, /* 133 */ EINVAL, /* 134 */ diff --git a/win/tclWinPort.h b/win/tclWinPort.h index 9f7a7c4..baf38fb 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.28 2002/05/24 21:19:09 dkf Exp $ + * RCS: @(#) $Id: tclWinPort.h,v 1.29 2002/05/27 10:14:21 dkf Exp $ */ #ifndef _TCLWINPORT @@ -199,11 +199,13 @@ #ifndef EREMOTE #define EREMOTE 66 /* The object is remote */ #endif -/* - * Note that EOVERFLOW is really just a specialist ERANGE... - */ #ifndef EOVERFLOW -#define EOVERFLOW ERANGE /* The object couldn't fit in the datatype */ +#ifdef +#define EOVERFLOW EFBIG /* The object couldn't fit in the datatype */ +#else +#define EOVERFLOW EINVAL /* Better than nothing! */ +#endif +#endif #endif /* |