Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1)

Delta Between Two Patch Sets: Modules/posixmodule.c

Issue 21719: Returning Windows file attribute information via os.stat()
Left Patch Set: Created 5 years, 7 months ago
Right Patch Set: Created 5 years, 7 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « Lib/test/test_stat.py ('k') | Modules/_stat.c » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 1
2 /* POSIX module implementation */ 2 /* POSIX module implementation */
3 3
4 /* This file is also used for Windows NT/MS-Win. In that case the 4 /* This file is also used for Windows NT/MS-Win. In that case the
5 module actually calls itself 'nt', not 'posix', and a few 5 module actually calls itself 'nt', not 'posix', and a few
6 functions are either unimplemented or implemented differently. The source 6 functions are either unimplemented or implemented differently. The source
7 assumes that for Windows NT, the macro 'MS_WINDOWS' is defined independent 7 assumes that for Windows NT, the macro 'MS_WINDOWS' is defined independent
8 of the compiler used. Different compilers define their own feature 8 of the compiler used. Different compilers define their own feature
9 test macro, e.g. '__BORLANDC__' or '_MSC_VER'. */ 9 test macro, e.g. '__BORLANDC__' or '_MSC_VER'. */
10 10
(...skipping 1416 matching lines...) Expand 10 before | Expand all | Expand 10 after
1427 int st_uid; 1427 int st_uid;
1428 int st_gid; 1428 int st_gid;
1429 unsigned long st_rdev; 1429 unsigned long st_rdev;
1430 __int64 st_size; 1430 __int64 st_size;
1431 time_t st_atime; 1431 time_t st_atime;
1432 int st_atime_nsec; 1432 int st_atime_nsec;
1433 time_t st_mtime; 1433 time_t st_mtime;
1434 int st_mtime_nsec; 1434 int st_mtime_nsec;
1435 time_t st_ctime; 1435 time_t st_ctime;
1436 int st_ctime_nsec; 1436 int st_ctime_nsec;
1437 unsigned long st_file_attributes; 1437 unsigned long st_file_attributes;
haypo 2014/06/13 16:00:20 Should we use a DWORD here?
loewis 2014/06/13 21:41:01 No. DWORD is guaranteed to be unsigned long on all
1438 }; 1438 };
1439 1439
1440 static __int64 secs_between_epochs = 11644473600; /* Seconds between 1.1.1601 an d 1.1.1970 */ 1440 static __int64 secs_between_epochs = 11644473600; /* Seconds between 1.1.1601 an d 1.1.1970 */
1441 1441
1442 static void 1442 static void
1443 FILE_TIME_to_time_t_nsec(FILETIME *in_ptr, time_t *time_out, int* nsec_out) 1443 FILE_TIME_to_time_t_nsec(FILETIME *in_ptr, time_t *time_out, int* nsec_out)
1444 { 1444 {
1445 /* XXX endianness. Shouldn't matter, as all Windows implementations are litt le-endian */ 1445 /* XXX endianness. Shouldn't matter, as all Windows implementations are litt le-endian */
1446 /* Cannot simply cast and dereference in_ptr, 1446 /* Cannot simply cast and dereference in_ptr,
1447 since it might not be aligned properly */ 1447 since it might not be aligned properly */
(...skipping 10921 matching lines...) Expand 10 before | Expand all | Expand 10 after
12369 PyModule_AddObject(m, "_have_functions", list); 12369 PyModule_AddObject(m, "_have_functions", list);
12370 12370
12371 initialized = 1; 12371 initialized = 1;
12372 12372
12373 return m; 12373 return m;
12374 } 12374 }
12375 12375
12376 #ifdef __cplusplus 12376 #ifdef __cplusplus
12377 } 12377 }
12378 #endif 12378 #endif
LEFTRIGHT

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+