Lines 411-420
if sys.platform.startswith('win'):
Link Here
|
411 |
_name_struct_stat = '_stati64' |
411 |
_name_struct_stat = '_stati64' |
412 |
INCLUDES = ['sys/types.h', 'sys/stat.h', 'sys/statvfs.h'] |
412 |
INCLUDES = ['sys/types.h', 'sys/stat.h', 'sys/statvfs.h'] |
413 |
else: |
413 |
else: |
414 |
if _LINUX: |
414 |
_name_struct_stat = 'stat' |
415 |
_name_struct_stat = 'stat64' |
|
|
416 |
else: |
417 |
_name_struct_stat = 'stat' |
418 |
INCLUDES = ['sys/types.h', 'sys/stat.h', 'sys/statvfs.h', 'unistd.h'] |
415 |
INCLUDES = ['sys/types.h', 'sys/stat.h', 'sys/statvfs.h', 'unistd.h'] |
419 |
|
416 |
|
420 |
compilation_info = ExternalCompilationInfo( |
417 |
compilation_info = ExternalCompilationInfo( |
Lines 564-580
def build_statvfs_result(st):
Link Here
|
564 |
# Implement and register os.stat() & variants |
561 |
# Implement and register os.stat() & variants |
565 |
|
562 |
|
566 |
if not _WIN32: |
563 |
if not _WIN32: |
567 |
c_fstat = rffi.llexternal('fstat64' if _LINUX else 'fstat', |
564 |
c_fstat = rffi.llexternal('fstat', |
568 |
[rffi.INT, STAT_STRUCT], rffi.INT, |
565 |
[rffi.INT, STAT_STRUCT], rffi.INT, |
569 |
compilation_info=compilation_info, |
566 |
compilation_info=compilation_info, |
570 |
save_err=rffi.RFFI_SAVE_ERRNO, |
567 |
save_err=rffi.RFFI_SAVE_ERRNO, |
571 |
macro=True) |
568 |
macro=True) |
572 |
c_stat = rffi.llexternal('stat64' if _LINUX else 'stat', |
569 |
c_stat = rffi.llexternal('stat', |
573 |
[rffi.CCHARP, STAT_STRUCT], rffi.INT, |
570 |
[rffi.CCHARP, STAT_STRUCT], rffi.INT, |
574 |
compilation_info=compilation_info, |
571 |
compilation_info=compilation_info, |
575 |
save_err=rffi.RFFI_SAVE_ERRNO, |
572 |
save_err=rffi.RFFI_SAVE_ERRNO, |
576 |
macro=True) |
573 |
macro=True) |
577 |
c_lstat = rffi.llexternal('lstat64' if _LINUX else 'lstat', |
574 |
c_lstat = rffi.llexternal('lstat', |
578 |
[rffi.CCHARP, STAT_STRUCT], rffi.INT, |
575 |
[rffi.CCHARP, STAT_STRUCT], rffi.INT, |
579 |
compilation_info=compilation_info, |
576 |
compilation_info=compilation_info, |
580 |
save_err=rffi.RFFI_SAVE_ERRNO, |
577 |
save_err=rffi.RFFI_SAVE_ERRNO, |
Lines 676-682
def lstat3(path):
Link Here
|
676 |
|
673 |
|
677 |
if rposix.HAVE_FSTATAT: |
674 |
if rposix.HAVE_FSTATAT: |
678 |
from rpython.rlib.rposix import AT_FDCWD, AT_SYMLINK_NOFOLLOW |
675 |
from rpython.rlib.rposix import AT_FDCWD, AT_SYMLINK_NOFOLLOW |
679 |
c_fstatat = rffi.llexternal('fstatat64' if _LINUX else 'fstatat', |
676 |
c_fstatat = rffi.llexternal('fstatat', |
680 |
[rffi.INT, rffi.CCHARP, STAT_STRUCT, rffi.INT], rffi.INT, |
677 |
[rffi.INT, rffi.CCHARP, STAT_STRUCT, rffi.INT], rffi.INT, |
681 |
compilation_info=compilation_info, |
678 |
compilation_info=compilation_info, |
682 |
save_err=rffi.RFFI_SAVE_ERRNO, macro=True) |
679 |
save_err=rffi.RFFI_SAVE_ERRNO, macro=True) |
683 |
- |
|
|