RE : Re: error and program_name

2010-12-23 Thread Bastien ROUCARIES
If chdir is a problem, why not using a heavy weight approach (better safe than sorry particularly if gnulib is used for a lot of project): - fork and exec an helper for name resolution - pass fd using a socket It is really heavy but it is on the safe side Bastien Le 23 déc. 2010 03:12, Paul

Re: error and program_name

2010-12-23 Thread Jim Meyering
Eric Blake wrote: On 12/22/2010 03:19 PM, Jim Meyering wrote: Bruno Haible wrote: Ping? No one wants to solve this? It's a critical issue for libposix. Eric Blake wrote: error() is not POSIX. Maybe the thing to do is figure out what in libposix is dragging in error(), and work on breaking

RE: porting stdioext to HP-NonStop

2010-12-23 Thread Joachim Schmitz
Hi Bruno OK, a couple of problems: During compile of gllib: NSIG missing, I added it to gllib/spwani.c, in a brute force fashion (#define NSIG 32) without really know what I'm doing here... /bin/kill -l | wc -w returns 33. During compile of gltests: Something very weird errors in

Re: openat, failing fchdir

2010-12-23 Thread Bruno Haible
Hi Paul, For example, if save_cwd called currdir_fd = open (.); then on a platform that supports fchdir() natively [not gnulib's emulation], a failure to do fchdir (currdir_fd) is of type (a). It can only occur if some other part of the program did side effects on currdir_fd.

Re: openat, failing fchdir

2010-12-23 Thread Bruno Haible
Bastien ROUCARIES wrote: If chdir is a problem, why not using a heavy weight approach (better safe than sorry particularly if gnulib is used for a lot of project): - fork and exec an helper for name resolution - pass fd using a socket It is really heavy but it is on the safe side I like

Re: signal.h on HP-NonStop

2010-12-23 Thread Bruno Haible
Hello Joachim, Please, let's use different mails with different subject for each topic. Otherwise I cannot keep track which issues have been dealt with, and the conversation dies down in confusion. During compile of gllib: NSIG missing, I added it to gllib/spwani.c, in a brute force fashion

Re: porting alignof to HP-NonStop

2010-12-23 Thread Bruno Haible
Joachim Schmitz wrote: During compile of gltests: Something very weird errors in test-allignof.c: source='test-alignof.c' object='test-alignof.o' libtool=no  DEPDIR=.deps depmode=none /bin/sh ./../build-aux/depcomp  cc -DHAVE_CONFIG_H -I.   -DGNULIB_STRICT_CHECKING=1  -I. -I.  -I.. -I./..  

Re: alphasort on HP-NonStop

2010-12-23 Thread Bruno Haible
Joachim Schmitz wrote: alphasort missing, need to modify gllib/dirent.in.h? How? source='test-dirent-c++.cc' object='test-dirent-c++.o' libtool=no   DEPDIR=.depsdepmode=none /bin/sh ./../build-aux/depcomp  c++ -HAVE_CONFIG_H -I.   -DGNULIB_STRICT_CHECKING=1  -I. -I.  -I.. -I./..  -I../gllib

Re: gethostname on HP-NonStop

2010-12-23 Thread Bruno Haible
Joachim Schmitz wrote: gethostname missing (resp. not found, it is available and declared in netdb.h), in various places. I added it to gllib/unistd.in.h source='test-fcntl-h-c++.cc' object='test-fcntl-h-c++.o' libtool=no   DEPDIR=.deps depmode=none /bin/sh ./../build-aux/depcomp  c++

Re: HOST_NAME_MAX on HP-NonStop

2010-12-23 Thread Bruno Haible
Joachim Schmitz wrote: Problem with HOST_NAME_MAX (MAXHOSTNAMELEN is set to 64 in arpa/nameser.h, added this to gllib/unistd.in.h, but don't think it belongs there):     char buf[HOST_NAME_MAX];          ^ /usr/local/Floss/gnulib/testdir-posix/gltests/test-gethostname.c, line 38:

Re: porting stdioext to HP-NonStop

2010-12-23 Thread Bruno Haible
Joachim Schmitz wrote: Our select() needs sys/time.h (for fd_set and friends), I added this to gllib/sys_select.in.h gnulib's lib/sys_select.in.h already contains an inclusion of sys/time.h. What was the symptom that you observed? Bruno

Re: printf.o HP-NonStop

2010-12-23 Thread Bruno Haible
Joachim Schmitz wrote: rpl_printf missing (during linking) (and an empty .o file created) ERROR [1210]:    test-stdio-c++.o (.rodata + 0x10): unresolved reference to rpl_printf. Hmm, an empty .o file indicates some other kind of error. Is it reproducible when you try to build

RE: signal.h on HP-NonStop

2010-12-23 Thread Joachim Schmitz
Hi Bruno OK, the highest number for any SIGsomething is 31, so NSIG should really be 32. The only SA_something Macros I can find are SA_DATA_SITE in sys/socket.h, most probably unrated, and SA_NOCLDSTOP and SA_RESERVED_31 in signal.h, and nothing that looks remotely like a replacement,

RE: gethostname on HP-NonStop

2010-12-23 Thread Joachim Schmitz
Oh well, it is not here. So some kind of workaround is needed. -Original Message- From: Bruno Haible [mailto:br...@clisp.org] Sent: Thursday, December 23, 2010 1:43 PM To: Joachim Schmitz Cc: bug-gnulib@gnu.org Subject: Re: gethostname on HP-NonStop Joachim Schmitz wrote: gethostname

RE: HOST_NAME_MAX on HP-NonStop

2010-12-23 Thread Joachim Schmitz
Good question. In config.h I can only see: #define HOST_NAME_MAX So it gets #define'd but with no value From config.log: configure:33394: checking for HOST_NAME_MAX configure:33420: cc -o conftest -g -I/usr/local/include conftest.c 5 static long int longval () { return MAXHOSTNAMELEN; }

Re: RE : Re: error and program_name

2010-12-23 Thread Jim Meyering
Bastien ROUCARIES wrote: If chdir is a problem, why not using a heavy weight approach (better safe than sorry particularly if gnulib is used for a lot of project): - fork and exec an helper for name resolution - pass fd using a socket It is really heavy but it is on the safe side Expensive

RE: porting stdioext to HP-NonStop

2010-12-23 Thread Joachim Schmitz
Yes, but with a condition that apparently is not met (and to deeply nested and complicated for me to grasp), hence my change: diff -u ./gllib/sys_select.in.h.orig ./gllib/sys_select.in.h --- ./gllib/sys_select.in.h.orig2010-10-10 16:05:05.0 -0500 +++ ./gllib/sys_select.in.h

RE: printf.o HP-NonStop

2010-12-23 Thread Joachim Schmitz
Hi Bruno test-stdio-c++.o was the empty file gllig/printf.o is not, but does not contain rpl_printf: $ nm -Pe gllib/printf.o E __stdio_fp F printf E rpl_vfprintf Bye, Jojo -Original Message- From: Bruno Haible [mailto:br...@clisp.org] Sent: Thursday, December

RE: alphasort on HP-NonStop

2010-12-23 Thread Joachim Schmitz
You mean add alphasort to gllib/dirent.in.h? We don't have an alphasort elsewhere And yes, we're quite a bit behind the current POSIX... -Original Message- From: Bruno Haible [mailto:br...@clisp.org] Sent: Thursday, December 23, 2010 1:40 PM To: Joachim Schmitz Cc: bug-gnulib@gnu.org

Re: socket functions on HP-NonStop

2010-12-23 Thread Bruno Haible
Joachim Schmitz wrote: Incompatible prototype for inet_ntop source='test-getaddrinfo.c' object='test-getaddrinfo.o' libtool=no   DEPDIR=.deps depmode=none /bin/sh ./../build-aux/depcomp  cc -DHAVE_CONFIG_H -I.  -DGNULIB_STRICT_CHECKING=1  -I. -I.  -I.. -I./..  -I../gllib -I./../gllib  

Re: RE : Re: error and program_name

2010-12-23 Thread Jim Meyering
Bastien ROUCARIÈS wrote: We could amortize the fork daemonize the daemon only once but we must care about security... but i could be done if fork is prohibitive. Starting a daemon... Yes, that sounds challenging. Unfortunatly context switching is the main cost so, i expext a heavy use

RE: socket functions on HP-NonStop

2010-12-23 Thread Joachim Schmitz
Libfloss is not used (yet?), but has some hooks for this problem, the compiler wrapper script it contains uses -DSOCKLEN_T=socklen_t. Other than that socklen_t is typedef'ed in sys/socket.h (and as an int) but, for some strange and probably historical reason, not used anywhere, in particular

RE: signal.h on HP-NonStop

2010-12-23 Thread Joachim Schmitz
My fix for NSIG: diff -u ./gllib/signal.in.h.orig ./gllib/signal.in.h --- ./gllib/signal.in.h.orig2010-10-10 16:05:05.0 -0500 +++ ./gllib/signal.in.h 2010-12-23 06:52:43.0 -0600 @@ -73,7 +73,7 @@ #if @GNULIB_SIGPROCMASK@ -# if !...@have_posix_signalblocking@ +# if

list protocol [was: signal.h on HP-NonStop]

2010-12-23 Thread Eric Blake
On 12/23/2010 05:30 AM, Bruno Haible wrote: Hello Joachim, Please, let's use different mails with different subject for each topic. Otherwise I cannot keep track which issues have been dealt with, and the conversation dies down in confusion. Also, it would be nice if you didn't top-post,

Re: openat, failing fchdir

2010-12-23 Thread Eric Blake
On 12/23/2010 05:08 AM, Bruno Haible wrote: Bastien ROUCARIES wrote: If chdir is a problem, why not using a heavy weight approach (better safe than sorry particularly if gnulib is used for a lot of project): - fork and exec an helper for name resolution - pass fd using a socket It is really

RE: porting alignof to HP-NonStop

2010-12-23 Thread Joachim Schmitz
Here's one of those CHECK macros expanded typedef struct { char slot1; char slot2; } char_helper; extern int (* verify_function40 (void)) [(! !sizeof (struct { unsigned int verify_error_if_negative_size__: (((size_t)__INTADDR__struct { char __slot1; char __slot2; } *)0)-__slot2))) ==

Re: openat, failing fchdir

2010-12-23 Thread Bruce Korb
On 12/23/10 06:52, Eric Blake wrote: Unfortunately, it is not possible to pass fds on cygwin; it is not possible to implement SCM_RIGHTS on top of what Windows provides. Then again, cygwin's *at functions don't need replacing, so it's a moot point. The whole exercise here is how to cater to

RE : Re: openat, failing fchdir

2010-12-23 Thread Bastien ROUCARIES
For cygwin and windows plateform see ntcreatefile that allow to open an handle relativly to another handle Bastien Le 23 déc. 2010 15:52, Eric Blake ebl...@redhat.com a écrit : On 12/23/2010 05:08 AM, Bruno Haible wrote: Bastien ROUCARIES wrote: If chdir is a problem, why... Unfortunately, it

RE : Re: openat, failing fchdir

2010-12-23 Thread Bastien ROUCARIES
Dear bruce, See my attempt to provide program name under aix hpux and irix, If you could test it, i could help you Btw instead of creating our own interface why not use the well known bsd interface? Getprogname() and setprogname()? Bastien Le 23 déc. 2010 18:19, Bruce Korb bk...@gnu.org a

Re: RE : Re: openat, failing fchdir

2010-12-23 Thread Eric Blake
On 12/23/2010 10:44 AM, Bastien ROUCARIES wrote: Bastien, can you please convince your mailer to preserve threading? Thanks. For cygwin and windows plateform see ntcreatefile that allow to open an handle relativly to another handle Yes, cygwin's already using that. Whether it makes sense to

Re: error and program_name

2010-12-23 Thread Bastien ROUCARIES
Le jeudi 23 décembre 2010 19:56:38, Paul Eggert a écrit : On 12/23/2010 06:13 AM, Jim Meyering wrote: inclined to think that going with subprocesses would be more trouble than it's worth. So be simple, for each openat fork and pass fd to parent process. Bastien

Re: [PATCH] snprintf: port snprintf (NULL, 0, ...) to Solaris 8 and 9

2010-12-23 Thread Paul Eggert
On 12/22/2010 03:25 PM, Paul Eggert wrote: Thanks for the review and these are all good suggestions; I'll look into them. Following up my own email -- I pushed this: From a80e645dd8bb8bc1bfdce5a2805cbfd37567 Mon Sep 17 00:00:00 2001 From: Paul Eggert egg...@cs.ucla.edu Date: Thu, 23 Dec