Posted to tcl by patthoyts at Tue Mar 31 22:24:09 GMT 2009view raw

  1. Index: generic/tcl.h
  2. ===================================================================
  3. RCS file: /cvsroot/tcl/tcl/generic/tcl.h,v
  4. retrieving revision 1.289
  5. diff -u -r1.289 tcl.h
  6. --- generic/tcl.h 19 Mar 2009 23:31:36 -0000 1.289
  7. +++ generic/tcl.h 20 Mar 2009 21:45:23 -0000
  8. @@ -381,11 +381,7 @@
  9. typedef struct stati64 Tcl_StatBuf;
  10. # define TCL_LL_MODIFIER "L"
  11. # else /* __BORLANDC__ */
  12. -# if _MSC_VER < 1400 || !defined(_M_IX86)
  13. -typedef struct _stati64 Tcl_StatBuf;
  14. -# else
  15. -typedef struct _stat64 Tcl_StatBuf;
  16. -# endif /* _MSC_VER < 1400 */
  17. +typedef struct Tcl_StatBuf_ Tcl_StatBuf;
  18. # define TCL_LL_MODIFIER "I64"
  19. # endif /* __BORLANDC__ */
  20. # else /* __WIN32__ */
  21. Index: generic/tclInt.h
  22. ===================================================================
  23. RCS file: /cvsroot/tcl/tcl/generic/tclInt.h,v
  24. retrieving revision 1.422
  25. diff -u -r1.422 tclInt.h
  26. --- generic/tclInt.h 21 Mar 2009 12:24:49 -0000 1.422
  27. +++ generic/tclInt.h 24 Mar 2009 21:48:01 -0000
  28. @@ -2415,6 +2415,31 @@
  29. } Tcl_PathPart;
  30.  
  31. /*
  32. + * To avoid a large collection of ifdefery for the various versions of
  33. + * MSVC on IX86/AMD64 to choose the right _stat64/_stati64/__stat64 and
  34. + * so on, instead we can just declare what we need. We want the st_size
  35. + * member to be wide and the time members to be time_t. This is a 64bit
  36. + * value on Win64 and a 32bit value on Win32.
  37. + */
  38. +
  39. +#ifdef _MSC_VER
  40. +#include <sys/types.h>
  41. +struct Tcl_StatBuf_ {
  42. + _dev_t st_dev;
  43. + _ino_t st_ino;
  44. + unsigned short st_mode;
  45. + short st_nlink;
  46. + short st_uid;
  47. + short st_gid;
  48. + _dev_t st_rdev;
  49. + Tcl_WideInt st_size;
  50. + time_t st_atime;
  51. + time_t st_mtime;
  52. + time_t st_ctime;
  53. +};
  54. +#endif
  55. +
  56. +/*
  57. *----------------------------------------------------------------
  58. * Data structures related to obsolete filesystem hooks
  59. *----------------------------------------------------------------