Log message:
Update to 34.0.4
Changelog:
## Noteworthy changes in release 34.0.4 (2018-02-20) [stable]
### Bugs Fixed
- `posix.time.clock_getres`, `posix.time.clock_gettime`
`posix.time.CLOCK_MONOTONIC`, `posix.time.CLOCK_REALTIME`,
`posix.time.CLOCK_PROCESS_CPUTIME_ID` and
`posix.time.CLOCK_THREAD_CPUTIME_ID` are all properly elided
on macOS again.
- `spec/spec_helper.lua` now looks in the correct objdir
for object modules built by luke, instead of hard-coding
`./linux/?.so`, so specl examples work on macOS and others
again.
## Noteworthy changes in release 34.0.3 (2018-02-19) [stable]
### Bugs Fixed
- `posix.deprecated.fadvise` is properly elided on macOS and other
hosts that have no `posix.fcntl.posix_fadvise` implementation.
## Noteworthy changes in release 34.0.2 (2018-02-17) [stable]
### Incompatible Changes
- `require 'posix'` (or any of its submodules) always returns a
populated module table, but no longer sets `_G.posix` or any
other global symbol on Lua 5.1 (including LuaJIT). If you were
relying on this behaviour, please change your require statments
to an assignment:
```lua
local posix = require 'posix'
```
### Bugs Fixed
- `posix.sys.wait.wait` returns `<childpid>, "running"` when the
child has not exited yet, and `wait` was called with `WNOHANG`
set.
- specs don't fail on valid -1 return values from `posix.sysconf`.
- loading posix (or any of its submodules) no longer leaks symbols
into the global namespace on Lua 5.1 (including LuaJIT).
## Noteworthy changes in release 34.0.1 (2017-07-09) [stable]
### Bugs Fixed
- `posix.sys.socket` works correctly on macOS again.
- `posix.sys.socket` abstract namespaces work correctly on Linux.
- `posix.syslog.openlog` keeps a copy of it's ident parameter string
in the Lua registry to ensure we don't hang on to a dangling
pointer.
- latest `build-aux/luke` and upgraded lukefile work correctly on
macOS now.
## Noteworthy changes in release 34.0 (2017-05-06) [stable]
### Incompatible Changes
- `posix.syslog` constants `LOG_AUTHPRIV`, `LOG_FTP` and `LOG_SYSLOG`
are no longer documented, and only defined when supported by the
host C library. They are not part of the POSIX API, and prevented
compilation of luaposix on AIX and Solaris.
- `getopt.getopt` was a binding to the GNU `getopt_long` extension,
which is not a POSIX API, and prevents luaposix from compiling on
hosts that do not provide the extended API. Instead we now correctly
bind POSIX getopt(3) in `posix.unistd`.
If you still have code that uses the old non-POSIX binding, then
LuaRocks has the Lua only `alt-getopt` module which is very similar,
and works even when the host C library has no `getopt_long` API;
alternatively, you should consider migrating to the far more
powerful Lua-only `optparse` library, also available from LuaRocks.
### New Features
- Replaced all Autotools and supporting Slingshot code with new Lua-
based `build-aux/luke` and `lukefile` describing how to compile and
install everything. Building with LuaRocks now leverages this too.
- New `posix.sys.socket.getsockopt` and `posix.sys.socket.getpeername`
bindings.
- New `posix.sys.msg.msgctl` binding, and `posix.sys.msg.IPC_RMID`,
`posix.sys.msg.IPC_SET` and `posix.sys.msg.IPC_STAT` constants to
use with it.
- New `posix.unistd.ftruncate` and `posix.unistd.truncate` bindings.
- `posix.fcntl.fcntl` now accepts undocumented `posix.fcntl.O_TMPFILE`
value where supported by the host C library.
### Bugs Fixed
- `posix.unistd.ttyname` now returns an error message in addition to
`nil` when it fails.
## Noteworthy changes in release 33.4.0 (2016-02-27) [stable]
### Incompatible Changes
- posix.curses has been split back out into its own separate
project again. If you want to upgrade your posix.curses using
project, something like the following minimal change will work
equivalently (assuming you have the new lcurses on your package
path):
```lua
local posix = require 'posix'
posix.curses = posix.curses or require 'lcurses'
```
### New Features
- New `posix.stdio.rename` binding.
- New `posix.fcntl.FD_CLOEXEC` flag for `posix.fcntl.fcntl`.
- New `posix.fcntl.O_CLOEXEC` flag for `posix.fcntl.open`, where
supported by the underlying system. Falling back to FD_CLOEXEC is
an exercise to the caller, so that non-atomicity is surfaced:
```lua
-- without error checking, for clarity
fd = fcntl.open ("/foo/bar", fcntl.O_CLOEXEC, stat.S_IRWXU)
if fcntl.O_CLOEXEC == 0 then
local flags = fcntl.fcntl (fd, fcntl.F_GETFD)
fcntl.fcntl (fd, fcntl.F_SETFD, bit.bor (flags, fcntl.FD_CLOEXEC)
end
```
- New `posix.unistd.tcgetpgrp` and `posix.unistd.tcsetpgrp` bindings
where supported by host C library.
- `posix.sys.socket` AF_UNIX path handling improvements enable use of
Linux only abstract namespace sockets.
- Documentation links now point at the newer OpenGroup issue 7 specs.
### Bugs Fixed
- Workaround for https://sourceware.org/bugzilla/show_bug.cgi?id=15088.
Predicate use of POSIX sched.h APIs on presence of sched.h, since glibc
defines _POSIX_PRIORITY_SCHEDULING erroneously, and musl libc
provides the sched.h APIs but doesn't define _POSIX_PRIORITY_SCHEDULING.
- `posix.sys.socket` AF_UNIX APIs pass path arguments by length
instead of terminating at the first \0 byte.
- `posix.unistd.readlink` no longer fails when reading a link to an
unsized buffer or character special device node.
- `execx` is no longer leaked into the global namespace after loading
the posix module.
- `examples/fork2.lua` works correctly again.
- `posix.timeradd`, `posix.timercmp` and `posix.timersub` correctly
handle tables from the modern thin wrapper API (posix.sys.time),
while retaining compatibility with the legacy compatibility wrappers
(posix.gettimeofday).
## Noteworthy changes in release 33.3.1 (2015-03-01) [stable]
### Incompatible Changes
- The briefly lived `posix.system` API has been removed. It was renamed
to `posix.spawn` shortly after introduction, and can still be accessed
by the new symbol name.
### Bugs Fixed
- `local posix = require "posix"` works again, fixing the regression
introduced in the last release. The automated Travis checks have been
improved to catch this sort of bug in future.
## Noteworthy changes in release 33.3.0 (2015-02-28) [stable]
### New Features
- Improved documentation of `sockaddr` tables for `posix.sys.socket` calls.
- New `posix.sys.socket.getsockname` binding.
- Remove the `posix.bit32` library, and use Lua’s built-in `bit32` library.
- Can now be linked against NetBSD curses, albeit with several functions
not implemented by that library returning a "not implemented" error as
a consequence.
- New functions `popen`, `popen_pipeline` and `pclose` mimic the POSIX
functions of the same name while allowing tasks to be Lua functions.
- `fdopen` has been re-added, working on all supported Lua versions.
- `execx` allows a Lua function or command to be exec’d; `spawn` is now
implemented in terms of it.
### Incompatible Changes
- The ncurses-only `KEY_MOUSE` definition has been removed from
`posix.curses`.
### Bugs Fixed
- `posix.sys.resource` only provides RLIM_SAVED_CUR and RLIM_SAVED_MAX if
they are defined by the C library (which FreeBSD 10 does not).
- `posix.dirent.dir` and `posix.dirent.files` now raise a Lua `error()`
when unable to open the path argument, for orthogonality with `io.lines`.
- Workaround for manifest key clash between `posix.so` and `posix.lua` in
LuaRocks.
## Noteworthy changes in release 33.2.1 (2015-01-04) [stable]
### Bugs Fixed
- Install posix.curses.html documentation file correctly.
## Noteworthy changes in release 33.2.0 (2015-01-03) [stable]
### New Features
- QNX support.
### Bugs Fixed
- `posix.time.gmtime` and `posix.time.localtime` specifications now
work correctly in January too!
## Noteworthy changes in release 33.1.0 (2014-12-19) [stable]
### New Features
- New `posix.bit32` module with band, bnot and bor functions that can be
used from any supported Lua release, without worrying about loading an
external bit operations library.
- Preliminary Lua 5.3.0 compatibility.
### Bugs Fixed
- No more 'Bad Hints' errors from `posix.sys.socket.getaddrinfo` on many
hosts.
- `stdlib.setenv` accepts a 3rd argument again.
## Noteworthy changes in release 33.0.0 (2014-11-04) [stable]
### New Features
- The curses library is fully integrated into luaposix, including reasonably
comprehensive LDoc documentation (certainly much better than the single
wooly web-page in previous releases). For backwards compatibility, all
APIs are re-exported from the `curses` module.
- Most constants available through luaposix are now listed in the LDocs of
the submodule that defines them.
- For backwards compatibility, everything is still lumped together in the
`posix.???` namespace, but, now raw APIs have been reorganised according to
the POSIX header files they belong to:
```lua
local posix = require "posix"
local fcntl = require "posix.fcntl"
local unistd = require "posix.unistd"
local fd = fcntl.open ("x",
bit32.bor (posix.O_WRONLY, posix.O_CREAT), "u=rw")
unistd.write (fd, "Hello, World!\n")
unistd.close (fd)
```
This makes the documentation easier to navigate, and for a better mapping
between luaposix APIs and the C functions they wrap, so translating from
C is now easier than ever.
- Each of the newly separated submodules is self-contained, and can be copied
to another project for compiling and/or loading in a custom Lua runtime. If
you want to make use of this, in addition to the source for the modules you
copy, you'll also need at least the files `ext/posix/_helpers.c` and
`ext/include/lua52compat.c`, and also `ext/include/strlcat.c` for one or
two of them.
- Where submodule calls return a table representation of a similar C struct
from a POSIX API, the Lua return tables have an appropriate `_type` field
metatable entry compatible with lua-stdlib `std.object.type`.
- `posix.signal.signal` now accepts the constants `posix.signal.SIG_DFL` or
`posix.signal.SIG_IGN` in place of the strings "SIG_DFL" and \
"SIG_IGN".
- The submodule bindings `posix.time.gmtime`, `posix.time.localtime`,
`posix.time.mktime`, `posix.time.strftime` and `posix.time.strptime` now
accept or create PosixTm tables with 1-to-1 field name mappings with the
POSIX `struct tm`. The old APIs with custom field names is still available
as `posix.gmtime`, `posix.localtime`, `posix.mktime`, `posix.strftime` and
`posix.strptime`.
- Similarly, `posix.time.nanosleep` now takes and returns a PosixTimespec
table. The old API is still available as `posix.nanosleep`.
- Where supported by the underlying system, `posix.time.clock_getres` and
`posix.time.clock_gettime` now require a constant inte argument (newly
defined in the `posix.time` submodule), and returns a PosixTimespec table.
The old APIs are still available as `posix.clock_getres` and
`posix.clock_gettime`.
- Add `posix.unistd.gethostid`. The old `posix.hostid` API is still available
as an alias.
- Add group APIs from grp.h: `posix.grp.endgrent`, `posix.grp.getgrent`,
`posix.grp.getgrgid`, `posix.grp.getgrnam` and `posix.grp.setgrent`.
Consequently, `posix.getgroup` is now reimplemented in Lua over the POSIX
APIs.
- `posix.getgroup` defaults to current effective group when called with no
arguments, for consistency with `posix.getpasswd` API.
- Add pwd APIs from pwd.h: `posix.pwd.endpwent`, `posix.grp.getpwent`,
`posix.pwd.getpwnam`, `posix.pwd.getpwuid` and `posix.pwd.setpwent`.
Consequently, `posix.getpasswd` is now reimplemented in Lua over the POSIX
APIs.
- Add missing constants from sys/resource.h:
`posix.sys.resource.RLIM_INFINITY`, `posix.sys.resource.RLIM_SAVED_CUR`,
`posix.sys.resource.RLIM_SAVED_MAX`, `posix.sys.resource.RLIMIT_CORE`,
`posix.sys.resource.RLIMIT_CPU`, `posix.sys.resource.RLIMIT_DATA`,
`posix.sys.resource.RLIMIT_FSIZE`, `posix.sys.resource.RLIMIT_NOFILE`,
`posix.sys.resource.RLIMIT_STACK`, `posix.sys.resource.RLIMIT_AS`.
- Add missing APIs from unistd.h: `posix.unistd.getegid`,
`posix.unistd.geteuid`, `posix.unistd.getgid`, `posix.unistd.getuid`,
`posix.unistd.getpgrp`, `posix.unistd.getpid`, `posix.unistd.getppid`.
Consequently, `posix.getpid` is now reimplemented in Lua over the POSIX
APIs.
- Add missing constants from signal.h; `posix.signal.SIG_DFL` and
`posix.signal.SIG_IGN'.
- Add missing APIs from sys/stat.h: `posix.sys.stat.S_ISBLK`,
`posix.sys.stat.S_ISCHR`, `posix.sys.stat.S_ISDIR`,
`posix.sys.stat.S_ISFIFO`, `posix.sys.stat.S_ISLNK`,
`posix.sys.stat.S_ISREG`, `posix.sys.stat.S_ISSOCK`.
- Add missing constants from sys/stat.h: `posix.sys.stat.S_IFMT`,
`posix.sys.stat.S_IFBLK`, `posix.sys.stat.S_IFCHR`,
`posix.sys.stat.S_IFDIR`, `posix.sys.stat.S_IFIFO`,
`posix.sys.stat.S_IFLNK`, `posix.sys.stat.S_IFREG`,
`posix.sys.stat.S_IRWXU`, `posix.sys.stat.S_IRUSR`,
`posix.sys.stat.S_IWUSR`, `posix.sys.stat.S_IXUSR`,
`posix.sys.stat.S_IRWXG`, `posix.sys.stat.S_IRGRP`,
`posix.sys.stat.S_IWGRP`, `posix.sys.stat.S_IXGRP`,
`posix.sys.stat.S_IRWXO`, `posix.sys.stat.S_IROTH`,
`posix.sys.stat.S_IWOTH`, `posix.sys.stat.S_IXOTH`,
`posix.sys.stat.S_ISGID`, `posix.sys.stat.S_ISUID`.
- Add missing constants from syslog.h: `posix.syslog.LOG_CONS`,
`posix.syslog.LOG_NDELAY` and `posix.syslog.LOG_PID`.
- Add missing API from syslog.h: `posix.syslog.LOG_MASK`. Use this to
convert syslog priority constants into mask bits suitable for bitwise
ORing as the argument to `posix.syslog.setlogmask`.
- Add missing constants from time.h: `posix.time.CLOCK_MONOTONIC`,
`posix.time.CLOCK_PROCESS_CPUTIME_ID`, `posix.time.CLOCK_REALTIME` and
`posix.time.CLOCK_THREAD_CPUTIME_ID`.
- New `posix.unistd.exec` and `posix.unistd.execp` require a table of
arguments, with [0] defaulting to the command name. The old string
tuple passing API is still available as `posix.exec` and `posix.execp`.
- `posix.util.openpty` has moved to `posix.openpty`. The old API is still
available as an alias.
- All posix APIs now fully and correctly diagnose extraneous and wrong
type arguments with an error.
- Add `posix.IPC_NOWAIT`, `posix.MSG_EXCEPT` and `posix.MSG_NOERROR`
constants for message queues.
- Add `posix.IPPROTO_UDP` for socket programming.
- Add `posix.AI_NUMERICSERV` for posix.getaddrinfo hints flags.
- Add `posix.WUNTRACED` for posix.wait flags.
- Add `curses.A_COLOR` (where supported by the underlying curses library) for
extracting color pair assignments from the results of `curses.window.winch`.
- Add missing `curses.KEY_F31` constant.
### Bugs Fixed
- `posix.fadvise` is now spelled `posix.fcntl.posix_fadvise` and takes a
file descriptor first argument rather than a Lua file handle. The old
misspelled bad argument type version is undocumented but still works.
- `posix.getpasswd`, `posix.getpid`, `posix.pathconf`, `posix.stat`,
`posix.statvfs`, `posix.sysconf` and `posix.times` process a single table
argument with a list of types correctly.
- `posix.syslog.openlog` now takes the bitwise OR of those constants. The
old string option specified API is still available as `posix.openlog`.
- `posix.syslog.setlogmask` now takes the bitwise OR of bits returned by
passing priority constants to `posix.syslog.LOG_MASK`. The old API will
continue to be available as `posix.setlogmask`.
- `posix.readlink` is much more robust, and reports errors accurately.
- configured installation installs `posix.so` into the lua cpath directory
correctly.
- fixed a long-standing bug where the stdio buffers were not restored after
some posix.fcntl() examples, resulting in the `make check` output being
truncated -- often before terminal colors were returned to normal.
## Noteworthy changes in release 32 (2014-05-30) [stable]
### New Features
- Support for posix.socketpair call and posix.AF_UNIX constant.
- Previously undocumented spawn, pipeline, pipeline_iterator, pipeline_slurp,
euidaccess, timeradd, timercmp and timersub have been moved from the posix
table, which is reserved for strictly POSIX APIs to the posix.sys subtable.
The sys submodule automatically loads on first reference, so no need to
require it manually if you already have the main posix module loaded.
- posix api documentation is separated into groups for better discovery.
### Bugs Fixed
- Builds correctly on hosts with no IPV6 capability.
- Small improvements in organisation of generated html docs.
- posix.openpty doesn't crash.
- configure now detects Lua correctly with busybox grep.
- Many fine portability fixes from latest gnulib.
- Missing docs for accept, bind, connect, getaddrinfo, listen, recv,
recvfrom, send, sendto, setsockopt, shutdown, socket and socketpair apis
is now provided.
- Missng docs for tcdrain, tcflow, tcflush, tcgetattr, tcsendbreak and
tcsetattr terminal apis are now provided.
- Docs for apis implemented in Lua are now shown correctly.
|