- 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
- 1x
- 1x
- 12x
- 11x
- 1x
- 1x
- 1x
- 1x
- 1x
- -------------------------------------------------------------------------------
- -- Extended OS package with some extra constants
- -- Author: Valentin Niess
- -- License: GNU LGPL-3.0
- -------------------------------------------------------------------------------
- local jit = require('jit')
- local os_ = {}
- -------------------------------------------------------------------------------
- -- Wrap the native os package
- -------------------------------------------------------------------------------
- for k, v in pairs(os) do
- os_[k] = v
- end
- -------------------------------------------------------------------------------
- -- Add some OS specific constants
- -------------------------------------------------------------------------------
- if jit.os == 'Windows' then
- os_.PATHSEP = '\\'
- os_.LINESEP = '\r\n'
- os_.LIBEXT = 'dll'
- else
- os_.PATHSEP = '/'
- os_.LINESEP = '\n'
- os_.LIBEXT = 'so'
- end
- -------------------------------------------------------------------------------
- -- Return the sub-package
- -------------------------------------------------------------------------------
- return os_