summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixPort.h
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2002-06-07 08:50:22 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2002-06-07 08:50:22 (GMT)
commit92dd671c1f650d5619b47e4cbf82d13c78b8eab8 (patch)
tree6442b50f0091beeecd46e4a86c3e4051252d6689 /unix/tclUnixPort.h
parent2cce2f2f376d3a52b69cf0a2c37eba7fb3aa7e6d (diff)
downloadtcl-92dd671c1f650d5619b47e4cbf82d13c78b8eab8.zip
tcl-92dd671c1f650d5619b47e4cbf82d13c78b8eab8.tar.gz
tcl-92dd671c1f650d5619b47e4cbf82d13c78b8eab8.tar.bz2
Make sure EOVERFLOW is defined on Unix.
Diffstat (limited to 'unix/tclUnixPort.h')
-rw-r--r--unix/tclUnixPort.h47
1 files changed, 31 insertions, 16 deletions
diff --git a/unix/tclUnixPort.h b/unix/tclUnixPort.h
index d3d7a09..cf1ec22 100644
--- a/unix/tclUnixPort.h
+++ b/unix/tclUnixPort.h
@@ -19,7 +19,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclUnixPort.h,v 1.24 2002/02/25 16:46:40 dgp Exp $
+ * RCS: @(#) $Id: tclUnixPort.h,v 1.25 2002/06/07 08:50:22 dkf Exp $
*/
#ifndef _TCLUNIXPORT
@@ -325,6 +325,8 @@ EXTERN int gettimeofday _ANSI_ARGS_((struct timeval *tp,
#ifndef S_IFLNK
# define lstat stat
+# define lstat64 stat64
+# define Tcl_PlatformLStat Tcl_PlatformStat
#endif
/*
@@ -338,49 +340,49 @@ EXTERN int gettimeofday _ANSI_ARGS_((struct timeval *tp,
# 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 */
#ifndef S_ISLNK
# ifdef S_IFLNK
# define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
# else
# define S_ISLNK(m) 0
# endif
-# endif
+#endif /* !S_ISLNK */
#ifndef S_ISSOCK
# ifdef S_IFSOCK
# define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK)
# else
# define S_ISSOCK(m) 0
# endif
-# endif
+#endif /* !S_ISSOCK */
/*
* Make sure that MAXPATHLEN is defined.
@@ -409,16 +411,16 @@ EXTERN int gettimeofday _ANSI_ARGS_((struct timeval *tp,
#ifndef NO_FD_SET
# define SELECT_MASK fd_set
-#else
+#else /* NO_FD_SET */
# ifndef _AIX
typedef long fd_mask;
-# endif
+# endif /* !AIX */
# if defined(_IBMR2)
# define SELECT_MASK void
-# else
+# else /* !defined(_IBMR2) */
# define SELECT_MASK int
-# endif
-#endif
+# endif /* defined(_IBMR2) */
+#endif /* !NO_FD_SET */
/*
* Define "NBBY" (number of bits per byte) if it's not already defined.
@@ -438,13 +440,13 @@ EXTERN int gettimeofday _ANSI_ARGS_((struct timeval *tp,
# else
# define FD_SETSIZE 256
# endif
-#endif
+#endif /* FD_SETSIZE */
#if !defined(howmany)
# define howmany(x, y) (((x)+((y)-1))/(y))
-#endif
+#endif /* !defined(howmany) */
#ifndef NFDBITS
# define NFDBITS NBBY*sizeof(fd_mask)
-#endif
+#endif /* NFDBITS */
#define MASK_SIZE howmany(FD_SETSIZE, NFDBITS)
/*
@@ -456,6 +458,19 @@ EXTERN int gettimeofday _ANSI_ARGS_((struct timeval *tp,
extern int errno;
/*
+ * Not all systems declare all the errors that Tcl uses! Provide some
+ * work-arounds...
+ */
+
+#ifndef EOVERFLOW
+# ifdef EFBIG
+# define EOVERFLOW EFBIG
+# else /* !EFBIG */
+# define EOVERFLOW EINVAL
+# endif /* EFBIG */
+#endif /* EOVERFLOW */
+
+/*
* Variables provided by the C library:
*/