~ubuntu-branches/ubuntu/saucy/di/saucy

« back to all changes in this revision

Viewing changes to D/features/mkconfig.dat

  • Committer: Package Import Robot
  • Author(s): Michael Ablassmeier
  • Date: 2011-10-26 16:43:43 UTC
  • mfrom: (1.1.13) (3.1.8 sid)
  • Revision ID: package-import@ubuntu.com-20111026164343-53m2p7epqj192mat
Tags: 4.30-1
* New upstream release
* Build only C version, adjust debian/rules

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#
2
 
# $Id: mkconfig.dat,v 1.4 2010-12-29 08:20:18-08 bll Exp $
 
2
# $Id: mkconfig.dat,v 1.14 2011-10-03 20:08:28-07 bll Exp $
3
3
# $Source: /home/bll/DI/di/D/features/RCS/mkconfig.dat,v $
4
 
# Copyright 2010 Brad Lanam, Walnut Creek, California USA
 
4
# Copyright 2011 Brad Lanam, Walnut Creek, California USA
5
5
#
6
6
#
7
7
option-file ../dioptions.dat
8
8
 
9
9
loadunit d-main
10
10
 
11
 
output   config.d
 
11
output  config.d
12
12
 
13
13
standard
14
14
 
 
15
csizes
 
16
 
 
17
# di.d: for version
 
18
chdr    version.h
 
19
 
 
20
# NLS support:
 
21
# libintl.h has dcls for gettext(), et. al.
15
22
chdr    libintl.h
 
23
# locale.h has LC_ALL
 
24
chdr    locale.h
 
25
# unistd.h has geteuid, et. al.
 
26
chdr    unistd.h
 
27
 
 
28
# diskpart.d:
 
29
#   linux
 
30
# _PATH_MOUNTED MNTTYPE_IGNORE
16
31
chdr    mntent.h
17
 
chdr    windows.h
 
32
# for struct statvfs, statvfs()
 
33
#   linux
 
34
csys    statvfs.h
18
35
 
 
36
# diquota.d:
 
37
# XGETQUOTA
 
38
#   linux
 
39
chdr    linux/dqblk_xfs.h
 
40
#   solaris
 
41
csys    fs/ufs_quota.h
 
42
# quotas: QCMD, SUBCMD*, struct dqblk, USRQUOTA, GRPQUOTA
 
43
#   linux
 
44
csys    quota.h
 
45
# quotas: uid_t, gid_t
19
46
csys    types.h
20
 
csys    statvfs.h
21
 
 
22
 
# di
23
 
chdr    version.h
 
47
 
 
48
# NFS quotas
 
49
chdr    rpc/auth.h
 
50
chdr    rpc/clnt.h
 
51
chdr    rpc/rpc.h
 
52
chdr    rpcsvc/rquota.h
 
53
chdr    rpc/types.h
 
54
 
 
55
### For NLS support
24
56
 
25
57
clib    bindtextdomain -lintl, -lintl -liconv
 
58
clib    gettext -lintl, -lintl -liconv
 
59
clib    setlocale
 
60
clib    textdomain -lintl, -lintl -liconv
 
61
cdefine hex LC_ALL
 
62
cdcl    bindtextdomain
 
63
cdcl    gettext
 
64
cdcl    setlocale
 
65
cdcl    textdomain
 
66
command msgfmt
 
67
command gmsgfmt
 
68
 
 
69
### diskpart.d:
 
70
 
 
71
# get/set/endmntent
 
72
#   linux
26
73
clib    endmntent
27
 
clib    GetDiskFreeSpace
28
 
clib    GetDiskFreeSpaceEx
29
 
clib    GetDriveType
30
 
clib    GetLogicalDriveStrings
31
 
clib    GetVolumeInformation
 
74
cdcl    endmntent
 
75
#   unixware needs -lgen
32
76
clib    getmntent -lgen
33
 
clib    gettext -lintl, -lintl -liconv
34
 
clib    getvfsstat
 
77
cdcl    getmntent
35
78
clib    setmntent
 
79
cdcl    args noconst setmntent
 
80
# Linux: statvfs
36
81
clib    statvfs
37
 
 
38
 
# Linux: _PATH_MOUNTED mntent.h; MNTTYPE_IGNORE mntent.h
39
 
cdefstr _PATH_MOUNTED
40
 
cdefstr _PATH_MNTTAB
41
 
cdefstr MOUNTED
42
 
cdefstr MNTTAB
43
 
cdefstr MNTTYPE_IGNORE
44
 
 
45
 
# di
46
 
cdefstr DI_VERSION
47
 
 
48
 
# linux
49
 
ctype   __fsblkcnt_t
50
 
ctype   __fsfilcnt_t
51
 
# linux, 64-bit interface
52
 
ctype   __u_quad_t
53
 
ctype   __fsblkcnt64_t
54
 
ctype   __fsfilcnt64_t
55
 
# linux
 
82
cdcl    statvfs
 
83
# Linux: from statvfs.h
56
84
cstruct statvfs
57
 
 
58
 
# linux
 
85
cmember statvfs f_basetype
 
86
# Linux: from mntent.h
 
87
cdefine string _PATH_MOUNTED
 
88
cdefine string _PATH_MNTTAB
 
89
cdefine string MOUNTED
 
90
cdefine string MNTTAB
 
91
# Linux: from mntent.h
 
92
cdefine string MNTTYPE_IGNORE
 
93
# Linux: from mntent.h
59
94
cstruct mntent
60
 
 
61
 
cdcl    bindtextdomain
62
 
cdcl    endmntent
63
 
cdcl    GetDiskFreeSpace
64
 
cdcl    GetDiskFreeSpaceEx
65
 
cdcl    GetDriveType
66
 
cdcl    GetLogicalDriveStrings
67
 
cdcl    GetVolumeInformation
68
 
cdcl    getmntent
69
 
cdcl    gettext
70
 
#cdcl    getvfsstat
71
 
cdcl    args setmntent
72
 
cdcl    statvfs
73
 
cmember  statvfs f_basetype
74
 
 
 
95
# Linux: from statvfs.h
 
96
ctype int __fsblkcnt_t
 
97
ctype int __fsfilcnt_t
 
98
# Linux: 64-bit: from statvfs.h
 
99
ctype int __fsblkcnt64_t
 
100
ctype int __fsfilcnt64_t
 
101
 
 
102
### diquota.d
 
103
 
 
104
# uid/gid; geteuid, getegid
 
105
ctype int gid_t
 
106
ctype int __gid_t
 
107
ctype int uid_t
 
108
ctype int __uid_t
 
109
clib    getegid
 
110
clib    geteuid
 
111
cdcl    getegid
 
112
cdcl    geteuid
 
113
 
 
114
# from sys/quota.h
 
115
cdefine hex SUBCMDSHIFT
 
116
cdefine hex SUBCMDMASK
 
117
cmacro  QCMD sys/quota.h int int int
 
118
cdefine hex Q_GETQUOTA
 
119
cdefine hex Q_XGETQUOTA
 
120
cdefine hex USRQUOTA
 
121
cdefine hex GRPQUOTA
 
122
 
 
123
# from rpcsvc/rquota.h
 
124
cdefine int RQUOTAPROG
 
125
cdefine int RQUOTAVERS
 
126
cdefine int RQUOTAPROC_GETQUOTA
 
127
 
 
128
# from sys/quota.h
 
129
#   linux
 
130
clib    quotactl
 
131
cdcl    args noconst quotactl
 
132
cstruct dqblk
 
133
cmember  dqblk dqb_curspace
 
134
cmember  dqblk dqb_curblocks
 
135
cmember  dqblk dqb_fhardlimit
 
136
cmember  dqblk dqb_fsoftlimit
 
137
cmember  dqblk dqb_curfiles
 
138
 
 
139
# from linux/dqblk_xfs.h
 
140
#   linux
 
141
ctype int __s8
 
142
ctype int __s16
 
143
ctype int __s32
 
144
ctype int __u16
 
145
ctype int __u32
 
146
ctype int __u64
 
147
 
 
148
# Linux:
 
149
cdefine hex BLOCK_SIZE
 
150
# Linux: xfs quotas
 
151
cstruct fs_disk_quota
 
152
 
 
153
# Tru64, et. al.
 
154
cdefine hex DEV_BSIZE
 
155
# FreeBSD:
 
156
cdefine int __FreeBSD__
 
157
# AIX:
 
158
cdefine hex DQBSIZE
 
159
cdefine int _AIX
 
160
 
 
161
# from rpcsvc/rquota.h
 
162
#   linux
 
163
cdefine int TRUE
 
164
cdefine int FALSE
 
165
ctype int u_int64_t
 
166
ctype int u_int32_t
 
167
ctypedef __caddr_t
 
168
ctypedef caddr_t
 
169
 
 
170
# from rpc/auth.h
 
171
clib authunix_create_default
 
172
cdcl authunix_create_default
 
173
cmacro auth_destroy rpc/auth.h void 'AUTH *'
 
174
 
 
175
# from rpc/clnt.h
 
176
cmacro clnt_call rpc/clnt.h clnt_stat 'CLIENT *' u_long xdrproc_t caddr_t xdrproc_t caddr_t 'struct timeval'
 
177
cmacro clnt_destroy rpc/clnt.h void 'CLIENT *'
 
178
clib    clnt_create
 
179
cdcl    clnt_create
 
180
 
 
181
# NFS quotas
 
182
clib    xdr_quota_get
 
183
cdcl    xdr_quota_get
 
184
clib    xdr_quota_rslt
 
185
cdcl    xdr_quota_rslt
 
186
clib    xdr_string
 
187
cdcl    xdr_string
 
188
clib    xdr_int
 
189
cdcl    xdr_int
 
190
clib    xdr_u_int
 
191
cdcl    xdr_u_int
 
192
clib    xdr_bool
 
193
cdcl    xdr_bool
 
194
 
 
195
cdefine int RQ_PATHLEN
 
196
 
 
197
# from rpcsvc/rquota.h
 
198
ctype int bool_t
 
199
ctype int enum_t
 
200
ctype int u_int
 
201
ctype int u_long
 
202
ctype int int32_t
 
203
cstruct rquota
 
204
ctypedef rquota
 
205
cmemberxdr rquota rq_bhardlimit
 
206
cmemberxdr rquota rq_bsoftlimit
 
207
cmemberxdr rquota rq_curblocks
 
208
cmemberxdr rquota rq_fhardlimit
 
209
cmemberxdr rquota rq_fsoftlimit
 
210
cmemberxdr rquota rq_curfiles
 
211
cenum   gqr_status
 
212
ctypedef gqr_status
 
213
cstruct getquota_rslt
 
214
cmember  getquota_rslt gqr_status
 
215
cmember  getquota_rslt gqr_rquota
 
216
 
 
217
cenum xdr_op
 
218
cenum clnt_stat
 
219
cenum auth_stat
 
220
ctypedef xdrproc_t
 
221
ctype int  __time_t
 
222
ctype int  __suseconds_t
 
223
cstruct timeval
 
224
cstruct rpc_err
 
225
cstruct getquota_args
 
226
cmembertype getquota_args gqa_uid
 
227
cmemberxdr getquota_args gqa_uid
 
228
cstruct opaque_auth
 
229
cunion des_block
 
230
cstruct AUTH
 
231
ctypedef AUTH
 
232
cstruct CLIENT
 
233
ctypedef CLIENT
 
234
cstruct XDR
 
235
ctypedef XDR
 
236
 
 
237
### di.d
 
238
cdefine string DI_VERSION
 
239
 
 
240
### options
75
241
# see dioptions.dat to change these
76
242
option  DI_DEFAULT_FORMAT smbuvpT
77
243
option  DI_DEFAULT_DISP_SIZE H
78
244
 
 
245
ifnotoption NLS
 
246
  set _lib_bindtextdomain 0
 
247
  set _lib_gettext 0
 
248
  set _lib_setlocale 0
 
249
  set _lib_textdomain 0
 
250
  set _hdr_libintl 0
 
251
  set _hdr_locale 0
 
252
  set _command_msgfmt 0
 
253
  set _command_gmsgfmt 0
 
254
endif
 
255
 
 
256
if hasnls _clib_bindtextdomain && _clib_gettext && _clib_setlocale && \
 
257
    _clib_textdomain && _hdr_libintl && _hdr_locale && \
 
258
    ( _command_msgfmt || _command_gmsgfmt )
 
259
  setint _enable_nls 1
 
260
else
 
261
  set _clib_bindtextdomain 0
 
262
  set _clib_gettext 0
 
263
  set _clib_setlocale 0
 
264
  set _clib_textdomain 0
 
265
  set _hdr_libintl 0
 
266
  set _hdr_locale 0
 
267
  set _command_msgfmt 0
 
268
  set _command_gmsgfmt 0
 
269
  setint _enable_nls 0
 
270
endif
 
271
 
 
272
if stdquotas _hdr_linux_quota || _hdr_ufs_quota || _hdr_ufs_ufs_quota || \
 
273
    _sys_fs_ufs_quota || _sys_quota || _clib_quotactl
 
274
  setint _has_std_quotas 1
 
275
else
 
276
  setint _has_std_quotas 0
 
277
endif
 
278
 
 
279
if stdnfsquotas _hdr_rpc_rpc && _hdr_rpcsvc_rquota && _clib_xdr_int && \
 
280
    _cmemberxdr_rquota_rq_bhardlimit && _cmemberxdr_getquota_args_gqa_uid
 
281
  setint _has_std_nfs_quotas 1
 
282
else
 
283
  setint _has_std_nfs_quotas 0
 
284
endif
 
285
 
79
286
include
80
287
 
81
 
import core.stdc.stdio;
 
288
static if (_ctype_uid_t > 0) {
 
289
  alias C_TYP_uid_t   Uid_t;
 
290
} else {
 
291
  alias int     Uid_t;
 
292
}
 
293
static if (_ctype_gid_t > 0) {
 
294
  alias C_TYP_gid_t   Gid_t;
 
295
} else {
 
296
  alias int     Gid_t;
 
297
}
 
298
 
 
299
enum string DI_PROG = "di";
 
300
enum string DI_PREFIX = "/home/bll/DI/di/C/test_di";
 
301
// needed for getmntent()
 
302
import core.stdc.stdio;  // for FILE
82
303
 
83
304
endinclude