]> git.pld-linux.org Git - packages/gpart.git/blob - gpart-l64seek.patch
- move compressed patch to distfiles
[packages/gpart.git] / gpart-l64seek.patch
1 --- gpart-0.1h.orig/src/l64seek.c
2 +++ gpart-0.1h/src/l64seek.c
3 @@ -25,30 +25,11 @@
4  } ostck[OSTACKLEN];
5  static int             osptr = -1;
6  
7 -#if defined(__linux__) && defined(__i386__)
8 -_syscall5(int,_llseek,uint,fd,ulong,hi,ulong,lo,loff_t *,res,uint,wh)
9 -#endif
10 -
11 -
12 -
13  off64_t l64seek(int fd,off64_t offset,int whence)
14  {
15         off64_t         ret = (off64_t)-1;
16  
17 -#if defined(__linux__) && defined(__i386__)
18 -       int             iret;
19 -       unsigned long   ohi, olo;
20 -
21 -       ohi = (unsigned long)((offset >> 32) & 0xFFFFFFFF);
22 -       olo = (unsigned long)(offset & 0xFFFFFFFF);
23 -       iret = _llseek(fd,ohi,olo,&ret,whence);
24 -       if (iret == -1)
25 -               ret = (off64_t)-1;
26 -#endif
27 -
28 -#if defined(__FreeBSD__) || (defined(__linux__) && defined(__alpha__))
29         ret = lseek(fd,offset,whence);
30 -#endif
31  
32         return (ret);
33  }
34 --- gpart-0.1h.orig/src/l64seek.h
35 +++ gpart-0.1h/src/l64seek.h
36 @@ -17,6 +17,8 @@
37  #ifndef _L64SEEK_H
38  #define _L64SEEK_H
39  
40 +#include <sys/stat.h>
41 +#include <sys/types.h>
42  #include <unistd.h>
43  
44  /*
45 @@ -25,19 +27,7 @@
46   * offsets.
47   */
48  
49 -
50 -#if defined(__linux__)
51 -#      include <linux/unistd.h>
52 -#      include <sys/types.h>
53 -       typedef int64_t off64_t;
54 -#endif
55 -
56 -
57 -#if defined(__FreeBSD__)
58 -       typedef off_t off64_t;
59 -#endif
60 -
61 -
62 +typedef loff_t off64_t;
63  typedef off64_t s64_t;
64  
65  off64_t l64seek(int fd, off64_t offset, int whence);
66 @@ -45,5 +35,4 @@
67  int l64opush(int);
68  s64_t l64opop(int);
69  
70 -
71  #endif
This page took 0.088592 seconds and 3 git commands to generate.