File: lukefile

package info (click to toggle)
lua-posix 36.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,720 kB
  • sloc: ansic: 5,462; makefile: 21; sh: 6
file content (146 lines) | stat: -rw-r--r-- 5,285 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
package  = 'luaposix'
version  = '$USER'

defines  = {
   PACKAGE           = '"$package"',
   VERSION           = '"$version"',
   NDEBUG            = 1,
   _FORTIFY_SOURCE   = 2,
   platforms    = {
      aix       = {_ALL_SOURCE       = 1},
      bsd       = {_BSD_SOURCE       = 1},
      freebsd   = {__BSD_VISIBLE     = 1},
      -- Some Linux distros only reveal tm.tm_gmtoff and tm.tm_zone with
      -- _BSD_SOURCE defined.
      linux     = {
         _BSD_SOURCE       = 1,
         _DEFAULT_SOURCE   = 1,
      },
      macosx    = {_DARWIN_C_SOURCE  = 1},
      -- QNX is only POSIX 2001, but _XOPEN_SOURCE turns off other functions
      -- luaposix can bind.
      qnx       = {_POSIX_C_SOURCE   = '200112L'},
      unix      = {
         _POSIX_C_SOURCE   = '200809L',
         _XOPEN_SOURCE     = 700,
      },
      -- Otherwise, enable POSIX 2008.   Please send the output of `uname -s` if
      -- your host is not compliant.
      _POSIX_C_SOURCE      = '200809L',
   },
}

incdirs  = {
   'ext/include',
   '$LUA_INCDIR',
}

ldocs    = 'build-aux/config.ld.in'

modules  = {
   ['posix']               = 'lib/posix/init.lua',
   ['posix._base']         = 'lib/posix/_base.lua',
   ['posix._bitwise']      = 'lib/posix/_bitwise.lua',
   ['posix._strict']       = 'lib/posix/_strict.lua',
   ['posix.compat']        = 'lib/posix/compat.lua',
   ['posix.deprecated']    = 'lib/posix/deprecated.lua',
   ['posix.sys']           = 'lib/posix/sys.lua',
   ['posix.util']          = 'lib/posix/util.lua',

   ['posix.ctype']         = 'ext/posix/ctype.c',
   ['posix.dirent']        = 'ext/posix/dirent.c',
   ['posix.errno']         = 'ext/posix/errno.c',
   ['posix.fcntl']         = {
      defines  = {
         HAVE_POSIX_FADVISE   = {checkfunc='posix_fadvise'},
      },
      sources   = 'ext/posix/fcntl.c',
   },
   ['posix.fnmatch']       = 'ext/posix/fnmatch.c',
   ['posix.glob']          = 'ext/posix/glob.c',
   ['posix.grp']           = 'ext/posix/grp.c',
   ['posix.libgen']        = 'ext/posix/libgen.c',
   ['posix.poll']          = 'ext/posix/poll.c',
   ['posix.pwd']           = 'ext/posix/pwd.c',
   ['posix.sched']         = {
      defines   = {
         HAVE_SCHED_H            = {checkheader='sched.h'},
         HAVE_SCHED_GETSCHEDULER = {checkfunc='sched_getscheduler'},
         HAVE_SCHED_SETSCHEDULER = {checkfunc='sched_setscheduler'},
      },
      sources   = 'ext/posix/sched.c',
   },
   ['posix.signal']        = 'ext/posix/signal.c',
   ['posix.stdio']         = 'ext/posix/stdio.c',
   ['posix.stdlib']        = 'ext/posix/stdlib.c',
   ['posix.sys.msg']       = {
      defines   = {
         HAVE_SYS_MSG_H    = {checkheader='sys/msg.h'},
         HAVE_MSGRCV       = {checkfunc='msgrcv'},
         HAVE_MSGSND       = {checkfunc='msgsnd'},
      },
      sources   = 'ext/posix/sys/msg.c',
   },
   ['posix.sys.resource']  = 'ext/posix/sys/resource.c',
   ['posix.sys.socket']    = {
      defines   = {
         HAVE_NET_IF_H           = {checkheader='net/if.h', include='sys/socket.h'},
         HAVE_LINUX_NETLINK_H    = {checkheader='linux/netlink.h', include='sys/socket.h'},
         HAVE_LINUX_IF_PACKET_H  = {checkheader='linux/if_packet.h', include='sys/socket.h'},
      },
      libraries = {
         {checksymbol='socket', library='socket'},
      },
      sources   = 'ext/posix/sys/socket.c',
   },
   ['posix.sys.stat']      = 'ext/posix/sys/stat.c',
   ['posix.sys.statvfs']   = {
      defines   = {
         HAVE_STATVFS      = {checkfunc='statvfs'},
      },
      sources   = 'ext/posix/sys/statvfs.c',
   },
   ['posix.sys.time']      = 'ext/posix/sys/time.c',
   ['posix.sys.times']     = 'ext/posix/sys/times.c',
   ['posix.sys.utsname']   = 'ext/posix/sys/utsname.c',
   ['posix.sys.wait']      = 'ext/posix/sys/wait.c',
   ['posix.syslog']        = 'ext/posix/syslog.c',
   ['posix.termio']        = {
      defines   = {
         HAVE_TERMIOS_H    = {checkheader='termios.h'},
         HAVE_WS_XPIXEL    = {checkmember='struct winsize.ws_xpixel', include='termios.h'},
         HAVE_WS_YPIXEL    = {checkmember='struct winsize.ws_ypixel', include='termios.h'},
      },
      sources   = 'ext/posix/termio.c',
   },
   ['posix.time']          = {
      defines   = {
         HAVE_TM_GMTOFF    = {checkmember='struct tm.tm_gmtoff', include='time.h'},
         HAVE_TM_ZONE      = {checkmember='struct tm.tm_zone', include='time.h'},
      },
      libraries = {
         {
            ifdef          = '_POSIX_TIMERS',
            include        = 'unistd.h',
            checksymbol    = 'clock_gettime',
            library        = 'rt',
         },
      },
      sources   = 'ext/posix/time.c',
   },
   ['posix.unistd']        = {
      defines   = {
         HAVE_CRYPT           = {checkfunc='crypt'},
         HAVE_CRYPT_H         = {checkheader='crypt.h'},
         HAVE_DECL_FDATASYNC  = {checkdecl='fdatasync', include='unistd.h'},
         HAVE_FDATASYNC       = {checkfunc='fdatasync'},
         HAVE_GETHOSTID       = {checkfunc='gethostid'},
      },
      libraries = {
         {checksymbol='crypt', library='crypt'},
      },
      sources   = 'ext/posix/unistd.c',
   },
   ['posix.utime']         = 'ext/posix/utime.c',
   ['posix.version']       = 'lib/posix/version.lua.in',
}