Re: Issues in utmp/utmpx headers

2016-01-07 Thread Corinna Vinschen
On Dec 29 05:16, Brian Inglis wrote: > > > David Lee 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, ut

Re: Issues in utmp/utmpx headers

2016-01-07 Thread Corinna Vinschen
On Dec 27 10:56, David Lee wrote: > Hi all, > > 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.

Re: Issues in utmp/utmpx headers

2016-01-04 Thread Brian Inglis
> On 29 December 2015 at 13:16, Brian Inglis > systematicsw.ab.ca> wrote: >> 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; default the path if a null pointer or string >> a

Re: Issues in utmp/utmpx headers

2016-01-03 Thread David Lee
Sorry I am totally unfamiliar with Cygwin internals, here are some related questions: 1. how does one test a code path that involves a failed syscall (strdup() in this case, but can be others) in cygwin dll? 2. If the call to strdup() fails, I want to debug_print() the errno value set by strdup()

Re: Issues in utmp/utmpx headers

2015-12-28 Thread Brian Inglis
> > David Lee 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. Shou

Re: Issues in utmp/utmpx headers

2015-12-27 Thread David Lee
Hi, The issue isn't missing, not-installed packages. The issues are (1) some function declaration seem wrong; and (2) a constant is missing. Thanks. David Lee On 28 December 2015 at 03:02, Brian Inglis wrote: > David Lee gmail.com> writes: >> While trying to port bsdgames to Cygwin I spotted

Re: Issues in utmp/utmpx headers

2015-12-27 Thread Brian Inglis
David Lee 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? >

Issues in utmp/utmpx headers

2015-12-26 Thread David Lee
Hi all, 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 define