root/trunk/libarchive-d/libarchive/types.d

Revision 246, 0.9 kB (checked in by Anders, 4 years ago)

Add sqlite3 and libarchive bindings written by me. They are both hand-made, so typos may have went in but I think these should be of OK quality.

Line 
1 //
2 // libarchive modules for D
3 // Written by Anders Bergh <anders1@gmail.com>
4 // Released into the public domain
5 //
6
7 module libarchive.types;
8
9 // This is the only stuff that depends on Tango. If you want to use
10 // libarchive together with Phobos, either A) alias the types yourself
11 // or B) find the proper Phobos modules and import them here
12 version (Tango)
13 {
14     version (Posix)
15     {
16         public import tango.stdc.posix.sys.types;
17         public import tango.stdc.posix.sys.stat;
18     }
19
20     public import tango.stdc.stdint;
21 }
22
23 version (Posix)
24 {
25 }
26 else version (Windows)
27 {
28     // TODO: Check these, I just did these for the ones that were missing...
29     // I'm not really supporting Windows anyway
30     alias int uid_t;
31     alias int gid_t;
32     alias int ssize_t;
33     alias int dev_t;
34     alias int off_t;
35     alias int ino_t;
36     alias int stat_t;
37     alias int time_t;
38     alias int mode_t;
39 }
40 else
41 {
42     static assert(0, `No support for this platform!`);
43 }
Note: See TracBrowser for help on using the browser.