[PATCH] osutil: fix the declaration to work on different sizes of off_t

Maciej Fijalkowski fijall at gmail.com
Thu Sep 8 08:38:08 UTC 2016


# HG changeset patch
# User fijal
# Date 1473323878 -7200
#      Thu Sep 08 10:37:58 2016 +0200
# Node ID 8db87163c95d79da03644e3850551f3bfa802262
# Parent  e20945831e4f9362d2e113bafe527e2a0554f4b4
osutil: fix the declaration to work on different sizes of off_t

diff --git a/setup_osutil_cffi.py b/setup_osutil_cffi.py
--- a/setup_osutil_cffi.py
+++ b/setup_osutil_cffi.py
@@ -45,6 +45,8 @@
     ...;
 } attrreference_t;
 
+typedef int ... off_t;
+
 typedef struct val_attrs {
     uint32_t          length;
     attribute_set_t   returned;
@@ -52,14 +54,13 @@
     uint32_t          obj_type;
     struct timespec   mtime;
     uint32_t          accessmask;
-    int               datalength;
+    off_t             datalength;
     ...;
 } val_attrs_t;
 
 /* the exact layout of the above struct will be figured out during build time */
 
 typedef int ... time_t;
-typedef int ... off_t;
 
 typedef struct timespec {
     time_t tv_sec;


More information about the Mercurial-devel mailing list