Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | [Bug 3288345] Wrong Tcl_StatBuf used on Cygwin |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
7ad5febe39a26b2054a311d158502e55 |
User & Date: | jan.nijtmans 2012-03-15 21:14:05 |
Context
2012-03-19
| ||
16:51 |
| |
2012-03-15
| ||
21:14 | [Bug 3288345] Wrong Tcl_StatBuf used on Cygwin check-in: 7ad5febe39 user: jan.nijtmans tags: trunk | |
21:03 | [Bug 3288345] Wrong Tcl_StatBuf used on Cygwin check-in: 33b1706cef user: jan.nijtmans tags: core-8-5-branch | |
2012-03-12
| ||
12:40 | [Bug 3388350] mingw64 compiler warnings check-in: a798d1b44e user: jan.nijtmans tags: trunk | |
Changes
Changes to ChangeLog.
1 2 3 4 5 6 7 | 2012-03-12 Jan Nijtmans <[email protected]> * win/tclWinFile.c: [Bug 3388350] mingw64 compiler warnings 2012-03-11 Donal K. Fellows <[email protected]> * doc/*.n, doc/*.3: A number of small spelling and wording fixes. | > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | 2012-03-15 Jan Nijtmans <[email protected]> * generic/tcl.h: [Bug 3288345] Wrong Tcl_StatBuf used on Cygwin * unix/tclUnixFile.c * unix/tclUnixPort.h * win/cat.c: Remove cygwin stuff no longer needed * win/tclWinFile.c * win/tclWinPort.h 2012-03-12 Jan Nijtmans <[email protected]> * win/tclWinFile.c: [Bug 3388350] mingw64 compiler warnings 2012-03-11 Donal K. Fellows <[email protected]> * doc/*.n, doc/*.3: A number of small spelling and wording fixes. |
︙ | ︙ |
Changes to generic/tcl.h.
︙ | ︙ | |||
369 370 371 372 373 374 375 | * * 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) | | | 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; |
︙ | ︙ | |||
432 433 434 435 436 437 438 | # endif /* !TCL_LL_MODIFIER */ #else /* TCL_WIDE_INT_IS_LONG */ /* * The next short section of defines are only done when not running on Windows * or some other strange platform. */ # ifndef TCL_LL_MODIFIER | | > > > > > > > > > > > > > > | 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 | # endif /* !TCL_LL_MODIFIER */ #else /* TCL_WIDE_INT_IS_LONG */ /* * The next short section of defines are only done when not running on Windows * or some other strange platform. */ # ifndef TCL_LL_MODIFIER # ifdef __CYGWIN__ typedef 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; long long st_size; struct {long tv_sec;} st_atim; struct {long tv_sec;} st_mtim; struct {long tv_sec;} st_ctim; } Tcl_StatBuf; # elif defined(HAVE_STRUCT_STAT64) typedef struct stat64 Tcl_StatBuf; # else typedef struct stat Tcl_StatBuf; # endif /* HAVE_STRUCT_STAT64 */ # define TCL_LL_MODIFIER "ll" # endif /* !TCL_LL_MODIFIER */ # define Tcl_WideAsLong(val) ((long)((Tcl_WideInt)(val))) |
︙ | ︙ |
Changes to unix/tclUnixFile.c.
︙ | ︙ | |||
1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 | int TclpUtime( Tcl_Obj *pathPtr, /* File to modify */ struct utimbuf *tval) /* New modification date structure */ { return utime(Tcl_FSGetNativePath(pathPtr), tval); } /* * Local Variables: * mode: c * c-basic-offset: 4 * fill-column: 78 * End: | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 | int TclpUtime( Tcl_Obj *pathPtr, /* File to modify */ struct utimbuf *tval) /* New modification date structure */ { return utime(Tcl_FSGetNativePath(pathPtr), tval); } #ifdef __CYGWIN__ int TclOSstat(const char *name, Tcl_StatBuf *statBuf) { struct stat buf; int result = stat(name, &buf); statBuf->st_mode = buf.st_mode; statBuf->st_ino = buf.st_ino; statBuf->st_dev = buf.st_dev; statBuf->st_rdev = buf.st_rdev; statBuf->st_nlink = buf.st_nlink; statBuf->st_uid = buf.st_uid; statBuf->st_gid = buf.st_gid; statBuf->st_size = buf.st_size; statBuf->st_atime = buf.st_atime; statBuf->st_mtime = buf.st_mtime; statBuf->st_ctime = buf.st_ctime; return result; } int TclOSlstat(const char *name, Tcl_StatBuf *statBuf) { struct stat buf; int result = lstat(name, &buf); statBuf->st_mode = buf.st_mode; statBuf->st_ino = buf.st_ino; statBuf->st_dev = buf.st_dev; statBuf->st_rdev = buf.st_rdev; statBuf->st_nlink = buf.st_nlink; statBuf->st_uid = buf.st_uid; statBuf->st_gid = buf.st_gid; statBuf->st_size = buf.st_size; statBuf->st_atime = buf.st_atime; statBuf->st_mtime = buf.st_mtime; statBuf->st_ctime = buf.st_ctime; return result; } #endif /* * Local Variables: * mode: c * c-basic-offset: 4 * fill-column: 78 * End: |
︙ | ︙ |
Changes to unix/tclUnixPort.h.
︙ | ︙ | |||
74 75 76 77 78 79 80 | # define TclOSopen open64 #else typedef off_t Tcl_SeekOffset; # define TclOSseek lseek # define TclOSopen open #endif | > > > | > > | 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 | # define TclOSopen open64 #else typedef off_t Tcl_SeekOffset; # define TclOSseek lseek # define TclOSopen open #endif #ifdef __CYGWIN__ MODULE_SCOPE int TclOSstat(const char *name, Tcl_StatBuf *statBuf); MODULE_SCOPE int TclOSlstat(const char *name, Tcl_StatBuf *statBuf); #undef HAVE_STRUCT_STAT_ST_BLOCKS #undef HAVE_STRUCT_STAT_ST_BLKSIZE #elif defined(HAVE_STRUCT_STAT64) # define TclOSstat stat64 # define TclOSlstat lstat64 #else # define TclOSstat stat # define TclOSlstat lstat #endif |
︙ | ︙ |
Changes to win/cat.c.
︙ | ︙ | |||
12 13 14 15 16 17 18 | #ifdef TCL_BROKEN_MAINARGS /* On mingw32 and cygwin this doesn't work */ # undef UNICODE # undef _UNICODE #endif #include <stdio.h> | < < < | < | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | #ifdef TCL_BROKEN_MAINARGS /* On mingw32 and cygwin this doesn't work */ # undef UNICODE # undef _UNICODE #endif #include <stdio.h> #include <io.h> #include <string.h> #include <tchar.h> int _tmain(void) { char buf[1024]; |
︙ | ︙ |
Changes to win/tclWinFile.c.
︙ | ︙ | |||
1805 1806 1807 1808 1809 1810 1811 | int TclpObjChdir( Tcl_Obj *pathPtr) /* Path to new working directory. */ { int result; const TCHAR *nativePath; | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 | int TclpObjChdir( Tcl_Obj *pathPtr) /* Path to new working directory. */ { int result; const TCHAR *nativePath; nativePath = Tcl_FSGetNativePath(pathPtr); result = SetCurrentDirectory(nativePath); if (result == 0) { TclWinConvertError(GetLastError()); return -1; } return 0; } /* *---------------------------------------------------------------------- * * TclpGetCwd -- * * This function replaces the library version of getcwd(). (Obsolete * function, only retained for old extensions which may call it |
︙ | ︙ |
Changes to win/tclWinPort.h.
︙ | ︙ | |||
88 89 90 91 92 93 94 | #include <fcntl.h> #include <float.h> #include <malloc.h> #include <process.h> #include <signal.h> #include <limits.h> | < < < < < < < < < | | | | | < < < < < < < < < < < < < < < < < < < < | 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 | #include <fcntl.h> #include <float.h> #include <malloc.h> #include <process.h> #include <signal.h> #include <limits.h> #ifndef strncasecmp # define strncasecmp strnicmp #endif #ifndef strcasecmp # define strcasecmp stricmp #endif /* * Need to block out these includes for building extensions with MetroWerks * compiler for Win32. */ #ifndef __MWERKS__ #include <sys/stat.h> #include <sys/timeb.h> # ifdef __BORLANDC__ # include <utime.h> # else # include <sys/utime.h> # endif /* __BORLANDC__ */ #endif /* __MWERKS__ */ #include <time.h> /* * The following defines redefine the Windows Socket errors as * BSD errors so Tcl_PosixError can do the right thing. */ #ifndef ENOTEMPTY # define ENOTEMPTY 41 /* Directory not empty */ |
︙ | ︙ | |||
545 546 547 548 549 550 551 | #endif /* * The following defines wrap the system memory allocation routines for * use by tclAlloc.c. */ | < < < < < | | | < | 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 | #endif /* * The following defines wrap the system memory allocation routines for * use by tclAlloc.c. */ #define TclpSysAlloc(size, isBin) ((void*)HeapAlloc(GetProcessHeap(), \ (DWORD)0, (DWORD)size)) #define TclpSysFree(ptr) (HeapFree(GetProcessHeap(), \ (DWORD)0, (HGLOBAL)ptr)) #define TclpSysRealloc(ptr, size) ((void*)HeapReAlloc(GetProcessHeap(), \ (DWORD)0, (LPVOID)ptr, (DWORD)size)) /* * The following defines map from standard socket names to our internal * wrappers that redirect through the winSock function table (see the * file tclWinSock.c). */ |
︙ | ︙ |