1414# License along with this library; if not, write to the Free Software
1515# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
1616
17- from libc.stdint cimport uint64_t
18-
19- from c_ssh2 cimport LIBSSH2_SESSION, LIBSSH2_CHANNEL
17+ from c_ssh2 cimport LIBSSH2_SESSION, LIBSSH2_CHANNEL, libssh2_uint64_t
2018
2119
2220cdef extern from " libssh2_sftp.h" nogil:
@@ -26,7 +24,7 @@ cdef extern from "libssh2_sftp.h" nogil:
2624 pass
2725 ctypedef struct LIBSSH2_SFTP_ATTRIBUTES:
2826 unsigned long flags
29- uint64_t filesize
27+ libssh2_uint64_t filesize
3028 unsigned long uid, gid
3129 unsigned long permissions
3230 unsigned long atime, mtime
@@ -35,17 +33,17 @@ cdef extern from "libssh2_sftp.h" nogil:
3533 LIBSSH2_SFTP_ST_RDONLY
3634 LIBSSH2_SFTP_ST_NOSUID
3735 ctypedef struct LIBSSH2_SFTP_STATVFS:
38- uint64_t f_bsize # file system block size
39- uint64_t f_frsize # fragment size
40- uint64_t f_blocks # size of fs in f_frsize units
41- uint64_t f_bfree # free blocks
42- uint64_t f_bavail # free blocks for non-root
43- uint64_t f_files # inodes
44- uint64_t f_ffree # free inodes
45- uint64_t f_favail # free inodes for non-root
46- uint64_t f_fsid # file system ID
47- uint64_t f_flag # mount flags
48- uint64_t f_namemax # maximum filename length
36+ libssh2_uint64_t f_bsize # file system block size
37+ libssh2_uint64_t f_frsize # fragment size
38+ libssh2_uint64_t f_blocks # size of fs in f_frsize units
39+ libssh2_uint64_t f_bfree # free blocks
40+ libssh2_uint64_t f_bavail # free blocks for non-root
41+ libssh2_uint64_t f_files # inodes
42+ libssh2_uint64_t f_ffree # free inodes
43+ libssh2_uint64_t f_favail # free inodes for non-root
44+ libssh2_uint64_t f_fsid # file system ID
45+ libssh2_uint64_t f_flag # mount flags
46+ libssh2_uint64_t f_namemax # maximum filename length
4947 # SFTP File types
5048 enum :
5149 LIBSSH2_SFTP_S_IFMT # type of file mask
@@ -120,10 +118,10 @@ cdef extern from "libssh2_sftp.h" nogil:
120118 int libssh2_sftp_closedir(LIBSSH2_SFTP_HANDLE * handle)
121119 void libssh2_sftp_seek(LIBSSH2_SFTP_HANDLE * handle, size_t offset)
122120 void libssh2_sftp_seek64(LIBSSH2_SFTP_HANDLE * handle,
123- uint64_t offset)
121+ libssh2_uint64_t offset)
124122 void libssh2_sftp_rewind(LIBSSH2_SFTP_HANDLE * handle)
125123 size_t libssh2_sftp_tell(LIBSSH2_SFTP_HANDLE * handle)
126- uint64_t libssh2_sftp_tell64(LIBSSH2_SFTP_HANDLE * handle)
124+ libssh2_uint64_t libssh2_sftp_tell64(LIBSSH2_SFTP_HANDLE * handle)
127125 int libssh2_sftp_fstat_ex(LIBSSH2_SFTP_HANDLE * handle,
128126 LIBSSH2_SFTP_ATTRIBUTES * attrs,
129127 int setstat)
0 commit comments