bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: extensions module and Solaris


From: Bruno Haible
Subject: Re: extensions module and Solaris
Date: Wed, 28 May 2008 00:43:25 +0200
User-agent: KMail/1.5.4

Hi Eric,

It seems that your problem is that you want execute a script via system()
and at the same time force a particular shell, namely the $CONFIG_SHELL found
at configure time?

> $ gcc -o foo -Wall foo.c /usr/ccs/lib/values-xpg4.o

I would not use this approach for three reasons:

1) When you have to use /usr/ccs/lib/values-xpg4.o to get a particular
   behaviour, the chances are high that you will not be able to find a
   solutions for some other systems.
2) Linking with /usr/ccs/lib/values-xpg4.o may be contradictory with
   the CC options. If you set CC and CFLAGS so as to get traditional
   behaviour and then link with a file to get XPG4 behaviour, I would
   not bet that there aren't bad side-effects.

> Should we figure out a way to make inclusion of the extensions module cause 
> compilation on Solaris to favor the standards-compliant behavior of various 
> functions?  Should we try to directly add values-xpg4.o to the link line, or 
> are we better off providing a .c file which provides the same definition of 
> __xpg4 as what values-xpg4.o provides?

3) You are assuming a program being built. But gnulib is also used to build
   libraries, such as libgettextpo or Simon's crypto libraries. What effect
   would it have to put values-xpg4.o into such a shared library? It would
   probably cause a change of behaviour to _all_ programs linked with such a
   library.

Instead I would stop using the 'system' function (in particular its signal
handling behaviour is more often undesired than desired) and use the 'execute'
module instead. It allows you to specify the program to be launched explicitly,
without any hacks.

Bruno





reply via email to

[Prev in Thread] Current Thread [Next in Thread]