Tcl Source Code

Check-in [4bf64360a5]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:[Bug 3288345]: Bring cygwin Tcl_StatBuf a little bit closer to reality
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 4bf64360a5253c04deb2fbdc05824c895c489914
User & Date: jan 2011-04-21 21:15:23
Context
2011-04-24
19:26
Fix compilation warning in TclListObj - printf format mismatch check-in: 3e2ab34dea user: venkat tags: trunk
2011-04-23
12:24
Merge to feature branch check-in: 31660e19ea user: dkf tags: dkf-notifier-poll
2011-04-22
08:28
merge latest trunk Closed-Leaf check-in: 359a91e742 user: jan.nijtmans tags: jn-frq-3257396
2011-04-21
21:15
[Bug 3288345]: Bring cygwin Tcl_StatBuf a little bit closer to reality check-in: 4bf64360a5 user: jan tags: trunk
21:13
[Bug 3288345]: Bring cygwin Tcl_StatBuf a little closer to reality check-in: 781ea5180b user: jan tags: core-8-5-branch
18:50
Use macro to set List intreps check-in: 0353d21711 user: dgp tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to generic/tcl.h.

369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
 *
 * Note on converting between Tcl_WideInt and strings. This implementation (in
 * tclObj.c) depends on the function
 * sprintf(...,"%" TCL_LL_MODIFIER "d",...).
 */

#if !defined(TCL_WIDE_INT_TYPE)&&!defined(TCL_WIDE_INT_IS_LONG)
#   if defined(__WIN32__)
#      define TCL_WIDE_INT_TYPE __int64
#      ifdef __BORLANDC__
typedef struct stati64 Tcl_StatBuf;
#         define TCL_LL_MODIFIER	"L"
#      else /* __BORLANDC__ */
#         if defined(_WIN64)
typedef struct _stat64 Tcl_StatBuf;







|







369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
 *
 * Note on converting between Tcl_WideInt and strings. This implementation (in
 * tclObj.c) depends on the function
 * sprintf(...,"%" TCL_LL_MODIFIER "d",...).
 */

#if !defined(TCL_WIDE_INT_TYPE)&&!defined(TCL_WIDE_INT_IS_LONG)
#   if defined(__WIN32__) && !defined(__CYGWIN__)
#      define TCL_WIDE_INT_TYPE __int64
#      ifdef __BORLANDC__
typedef struct stati64 Tcl_StatBuf;
#         define TCL_LL_MODIFIER	"L"
#      else /* __BORLANDC__ */
#         if defined(_WIN64)
typedef struct _stat64 Tcl_StatBuf;

Changes to win/tclWinFile.c.

8
9
10
11
12
13
14



15
16
17
18
19
20
21
 *
 * Copyright (c) 1995-1998 Sun Microsystems, Inc.
 *
 * See the file "license.terms" for information on usage and redistribution of
 * this file, and for a DISCLAIMER OF ALL WARRANTIES.
 */




#include "tclWinInt.h"
#include "tclFileSystem.h"
#include <winioctl.h>
#include <sys/stat.h>
#include <shlobj.h>
#include <lm.h>		/* For TclpGetUserHome(). */








>
>
>







8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
 *
 * Copyright (c) 1995-1998 Sun Microsystems, Inc.
 *
 * See the file "license.terms" for information on usage and redistribution of
 * this file, and for a DISCLAIMER OF ALL WARRANTIES.
 */

#ifndef _WIN64
#   define _USE_32BIT_TIME_T
#endif
#include "tclWinInt.h"
#include "tclFileSystem.h"
#include <winioctl.h>
#include <sys/stat.h>
#include <shlobj.h>
#include <lm.h>		/* For TclpGetUserHome(). */

Changes to win/tclWinPort.h.

113
114
115
116
117
118
119
120
121
122
123
124
125
126
127





128
129
130

131
132
133
134
135
136
137
#include <time.h>

/*
 * Not all mingw32 versions have this struct.
 */
#if !defined(__BORLANDC__) && !defined(_MSC_VER) && !defined(_WIN64) && !defined(HAVE_STRUCT_STAT32I64)
  struct _stat32i64 {
    _dev_t st_dev;
    _ino_t st_ino;
    unsigned short st_mode;
    short st_nlink;
    short st_uid;
    short st_gid;
    _dev_t st_rdev;
    __int64 st_size;





    long st_atime;
    long st_mtime;
    long st_ctime;

  };
#endif

/*
 * The following defines redefine the Windows Socket errors as
 * BSD errors so Tcl_PosixError can do the right thing.
 */







|
|




|

>
>
>
>
>



>







113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
#include <time.h>

/*
 * Not all mingw32 versions have this struct.
 */
#if !defined(__BORLANDC__) && !defined(_MSC_VER) && !defined(_WIN64) && !defined(HAVE_STRUCT_STAT32I64)
  struct _stat32i64 {
    dev_t st_dev;
    ino_t st_ino;
    unsigned short st_mode;
    short st_nlink;
    short st_uid;
    short st_gid;
    dev_t st_rdev;
    __int64 st_size;
#ifdef __CYGWIN__
    struct {long tv_sec;} st_atim;
    struct {long tv_sec;} st_mtim;
    struct {long tv_sec;} st_ctim;
#else
    long st_atime;
    long st_mtime;
    long st_ctime;
#endif
  };
#endif

/*
 * The following defines redefine the Windows Socket errors as
 * BSD errors so Tcl_PosixError can do the right thing.
 */