Re: 'static' in array-size func parm

2014-08-06 Thread Thien-Thi Nguyen
() Paul Eggert () Wed, 06 Aug 2014 17:14:48 -0700 bug does not occur with nested functions Thanks for catching this. In my rush, i neglected to read ‘AC_COMPILE_IFELSE’ docs carefully. I have now moved the func defs into the PROLOGUE and added a BODY. -- Thien-Thi Nguyen GPG key: 4C8075

Re: Fix libunistring in MS-Windows locales

2014-08-06 Thread Daiki Ueno
Eli Zaretskii writes: >> > Actually, I see that libunistring already includes functions for >> > locking (which on Windows wrap the 2 APIs I mentioned above). So I >> > guess it's best to use them. >> >> Yes, could you create a patch in that direction? > > Will do. Here is a simple patch for t

Re: 'static' in array-size func parm

2014-08-06 Thread Paul Eggert
Thien-Thi Nguyen wrote: I have installed that change. Does it result in "...no" now? Unfortunately not, since the bug does not occur with nested functions (the most recent version nested the definition of 'last' and 'last1' inside 'main'). They need to be top-level functions to elicit the b

Re: 'static' in array-size func parm

2014-08-06 Thread Thien-Thi Nguyen
() Paul Eggert () Wed, 06 Aug 2014 09:16:48 -0700 I'd be interested in getting this to work in gnulib, but unfortunately it doesn't work yet with RCS so let's fix that first. OK. Actually, GCC 3.4.3 *can* compile that. [particulars] Please try the following program instead: int

[PATCH] getpass: conditionalize variable declarations

2014-08-06 Thread Jonas 'Sortie' Termansen
This fixes unused variable warnings. Additionally, the struct termios may not be defined on systems without tcsetattr and no termios header. --- lib/getpass.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/getpass.c b/lib/getpass.c index 43d0d59..18dc0b7 100644 --- a/lib/getpass.c +++ b

Re: 'static' in array-size func parm

2014-08-06 Thread Paul Eggert
I'd be interested in getting this to work in gnulib, but unfortunately it doesn't work yet with RCS so let's fix that first. Thien-Thi Nguyen wrote: I recently learned that GCC 3.4.3 on Solaris 10 cannot compile: int last (int count, int all[static count]) { return all[count - 1];

Fix weird _SC_OPEN_MAX usage

2014-08-06 Thread Jonas 'Sortie' Termansen
Hi, The files lib/spawn_faction_addopen.c lib/spawn_faction_addclose.c lib/spawn_faction_adddup2.c contains this unusual pattern: #if !_LIBC # define __sysconf(open_max) getdtablesize () #endif ... int maxfd = __sysconf (_SC_OPEN_MAX); This is non-portable to new systems that doesn't have the