Issues in utmp/utmpx headers
Corinna Vinschen
corinna-cygwin@cygwin.com
Thu Jan 7 14:43:00 GMT 2016
On Dec 29 05:16, Brian Inglis wrote:
> > > David Lee <mailtolky <at> gmail.com> writes:
> > >> While trying to port bsdgames to Cygwin I spotted the following issues:
> > >> (1) In /usr/include/utmpx.h, utmpxname() is declared a void function.
> > >> Should it return int?
> > >> (2) In /usr/include/sys/utmp.h, utmpname() is declared a void
> > >> function. Should it return int?
> > >> (3) _PATH_UTMPX is not defined in any system headers.
>
> > On 28 December 2015 at 03:02, Brian Inglis
> > <Brian.Inglis <at> systematicsw.ab.ca> wrote:
> > > Search packages for missing files e.g.
> > > https://cygwin.com/cgi-bin2/package-grep.cgi?grep=utmp.h&arch=x86_64
> > > brings up package cygwin-devel and cygwin32.
> > > Download and run setup and select cygwin-devel to install the headers and
> > > libraries.
>
> David Lee <mailtolky <at> gmail.com> writes:
> > The issue isn't missing, not-installed packages. The issues are (1)
> > some function declaration seem wrong; and (2) a constant is missing.
>
> Pardon my reading comprehension bork!
>
> The utmpname implementation in newlib-cygwin/winsup/cygwin/syscalls.cc
> could probably be improved to: avoid a memory leak; return -1 if
> strdup fails, zero otherwise;
This function is supposed to be called only once, so is it worth the
additional effort?
> default the path if a null pointer or string
> argument is passed.
The function now returns int and -1 if path is invalid.
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20160107/1b4de753/attachment.sig>
More information about the Cygwin
mailing list