gtsocial-umbx

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

issue120.diff (3151B)


      1 --- /home/jnml/tmp/test_syscall.c	2023-04-21 16:26:44.302689709 +0200
      2 +++ testdata/sqlite-src-3410200/src/test_syscall.c	2023-04-21 16:29:28.000869993 +0200
      3 @@ -110,15 +110,15 @@
      4  static int ts_fstat(int fd, struct stat *p);
      5  static int ts_ftruncate(int fd, off_t n);
      6  static int ts_fcntl(int fd, int cmd, ... );
      7 -static int ts_read(int fd, void *aBuf, size_t nBuf);
      8 -static int ts_pread(int fd, void *aBuf, size_t nBuf, off_t off);
      9 +static ssize_t ts_read(int fd, void *aBuf, size_t nBuf);
     10 +static ssize_t ts_pread(int fd, void *aBuf, size_t nBuf, off_t off);
     11  /* Note:  pread64() and pwrite64() actually use off64_t as the type on their
     12  ** last parameter.  But that datatype is not defined on many systems 
     13  ** (ex: Mac, OpenBSD).  So substitute a likely equivalent: sqlite3_uint64 */
     14 -static int ts_pread64(int fd, void *aBuf, size_t nBuf, sqlite3_uint64 off);
     15 -static int ts_write(int fd, const void *aBuf, size_t nBuf);
     16 -static int ts_pwrite(int fd, const void *aBuf, size_t nBuf, off_t off);
     17 -static int ts_pwrite64(int fd, const void *aBuf, size_t nBuf, sqlite3_uint64 off);
     18 +static ssize_t ts_pread64(int fd, void *aBuf, size_t nBuf, sqlite3_uint64 off);
     19 +static ssize_t ts_write(int fd, const void *aBuf, size_t nBuf);
     20 +static ssize_t ts_pwrite(int fd, const void *aBuf, size_t nBuf, off_t off);
     21 +static ssize_t ts_pwrite64(int fd, const void *aBuf, size_t nBuf, sqlite3_uint64 off);
     22  static int ts_fchmod(int fd, mode_t mode);
     23  static int ts_fallocate(int fd, off_t off, off_t len);
     24  static void *ts_mmap(void *, size_t, int, int, int, off_t);
     25 @@ -313,7 +313,7 @@
     26  /*
     27  ** A wrapper around read().
     28  */
     29 -static int ts_read(int fd, void *aBuf, size_t nBuf){
     30 +static ssize_t ts_read(int fd, void *aBuf, size_t nBuf){
     31    if( tsIsFailErrno("read") ){
     32      return -1;
     33    }
     34 @@ -323,7 +323,7 @@
     35  /*
     36  ** A wrapper around pread().
     37  */
     38 -static int ts_pread(int fd, void *aBuf, size_t nBuf, off_t off){
     39 +static ssize_t ts_pread(int fd, void *aBuf, size_t nBuf, off_t off){
     40    if( tsIsFailErrno("pread") ){
     41      return -1;
     42    }
     43 @@ -333,7 +333,7 @@
     44  /*
     45  ** A wrapper around pread64().
     46  */
     47 -static int ts_pread64(int fd, void *aBuf, size_t nBuf, sqlite3_uint64 off){
     48 +static ssize_t ts_pread64(int fd, void *aBuf, size_t nBuf, sqlite3_uint64 off){
     49    if( tsIsFailErrno("pread64") ){
     50      return -1;
     51    }
     52 @@ -343,7 +343,7 @@
     53  /*
     54  ** A wrapper around write().
     55  */
     56 -static int ts_write(int fd, const void *aBuf, size_t nBuf){
     57 +static ssize_t ts_write(int fd, const void *aBuf, size_t nBuf){
     58    if( tsIsFailErrno("write") ){
     59      if( tsErrno("write")==EINTR ) orig_write(fd, aBuf, nBuf/2);
     60      return -1;
     61 @@ -354,7 +354,7 @@
     62  /*
     63  ** A wrapper around pwrite().
     64  */
     65 -static int ts_pwrite(int fd, const void *aBuf, size_t nBuf, off_t off){
     66 +static ssize_t ts_pwrite(int fd, const void *aBuf, size_t nBuf, off_t off){
     67    if( tsIsFailErrno("pwrite") ){
     68      return -1;
     69    }
     70 @@ -364,7 +364,7 @@
     71  /*
     72  ** A wrapper around pwrite64().
     73  */
     74 -static int ts_pwrite64(int fd, const void *aBuf, size_t nBuf, sqlite3_uint64 off){
     75 +static ssize_t ts_pwrite64(int fd, const void *aBuf, size_t nBuf, sqlite3_uint64 off){
     76    if( tsIsFailErrno("pwrite64") ){
     77      return -1;
     78    }