All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Remove bash-ism from configure
@ 2007-02-11  2:06 Anthony Liguori
  2007-02-11 16:38 ` Johannes Schindelin
  0 siblings, 1 reply; 7+ messages in thread
From: Anthony Liguori @ 2007-02-11  2:06 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 151 bytes --]

This is one I introduced in the gcc-3.x autodetect.  It's against CVS 
from a little while ago so hopefully it's just fuzz.

Regards,

Anthony Liguori

[-- Attachment #2: configure-bashism.diff --]
[-- Type: text/x-patch, Size: 284 bytes --]

diff -r 00e394f6a849 configure
--- a/configure	Sat Feb 10 19:59:51 2007 -0600
+++ b/configure	Sat Feb 10 20:03:13 2007 -0600
@@ -339,7 +339,7 @@ int main(){return 0;}
 int main(){return 0;}
 EOF
     check_cc() {
-	which "$1" >&/dev/null
+	which "$1" 2>/dev/null
 	return $?
     }
 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [PATCH] Remove bash-ism from configure
  2007-02-11  2:06 [Qemu-devel] [PATCH] Remove bash-ism from configure Anthony Liguori
@ 2007-02-11 16:38 ` Johannes Schindelin
  2007-02-11 17:41   ` Anthony Liguori
  0 siblings, 1 reply; 7+ messages in thread
From: Johannes Schindelin @ 2007-02-11 16:38 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: qemu-devel

Hi,

On Sat, 10 Feb 2007, Anthony Liguori wrote:

> This is one I introduced in the gcc-3.x autodetect.  It's against CVS 
> from a little while ago so hopefully it's just fuzz.

AFAICT "which" is not really portable, either. But then, I always have a 
bash, so I really don't care.

Ciao,
Dscho

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [PATCH] Remove bash-ism from configure
  2007-02-11 16:38 ` Johannes Schindelin
@ 2007-02-11 17:41   ` Anthony Liguori
  2007-02-11 22:58     ` [Qemu-devel] " Oleg Verych
  2007-02-12  8:55     ` [Qemu-devel] " Krister Joas
  0 siblings, 2 replies; 7+ messages in thread
From: Anthony Liguori @ 2007-02-11 17:41 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: qemu-devel

Johannes Schindelin wrote:
> Hi,
>
> On Sat, 10 Feb 2007, Anthony Liguori wrote:
>
>   
>> This is one I introduced in the gcc-3.x autodetect.  It's against CVS 
>> from a little while ago so hopefully it's just fuzz.
>>     
>
> AFAICT "which" is not really portable, either. But then, I always have a 
> bash, so I really don't care.
>   

On my system, which is an executable, not a shell command so it's 
outside the scope of bashism.  It's also used elsewhere within configure.

We claim to use /bin/sh so we should not be using bashism.

Regards,

Anthony Liguori

> Ciao,
> Dscho
>
>
>   

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Qemu-devel] Re: [PATCH] Remove bash-ism from configure
  2007-02-11 17:41   ` Anthony Liguori
@ 2007-02-11 22:58     ` Oleg Verych
  2007-02-12  8:55     ` [Qemu-devel] " Krister Joas
  1 sibling, 0 replies; 7+ messages in thread
From: Oleg Verych @ 2007-02-11 22:58 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: qemu-devel

Hallo.

> From: Anthony Liguori <anthony@codemonkey.ws>
> Newsgroups: gmane.comp.emulators.qemu
> Subject: Re: [PATCH] Remove bash-ism from configure
> Date: Sun, 11 Feb 2007 11:41:32 -0600
[]
> On my system, which is an executable, not a shell command so it's 
> outside the scope of bashism.  It's also used elsewhere within configure.

`sh' version of `which' may be found in the Debian.

____

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [PATCH] Remove bash-ism from configure
  2007-02-11 17:41   ` Anthony Liguori
  2007-02-11 22:58     ` [Qemu-devel] " Oleg Verych
@ 2007-02-12  8:55     ` Krister Joas
  2007-02-12  9:17       ` [Qemu-devel] " Jernej Simončič
  1 sibling, 1 reply; 7+ messages in thread
From: Krister Joas @ 2007-02-12  8:55 UTC (permalink / raw)
  To: qemu-devel

On Feb 12, 2007, at 2:41 AM, Anthony Liguori wrote:
> Johannes Schindelin wrote:
>> Hi,
>>
>> On Sat, 10 Feb 2007, Anthony Liguori wrote:
>>
>>> This is one I introduced in the gcc-3.x autodetect.  It's against  
>>> CVS from a little while ago so hopefully it's just fuzz.
>>>
>>
>> AFAICT "which" is not really portable, either. But then, I always  
>> have a bash, so I really don't care.
>>
>
> On my system, which is an executable, not a shell command so it's  
> outside the scope of bashism.  It's also used elsewhere within  
> configure.

You should take a look at that executable.  On most systems I know, / 
usr/bin/which is a csh script.  It has to be because it also finds  
aliases.  It may or may not be portable to use 'which', I'm not  
really sure, but it's not very efficient.

Krister

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] Remove bash-ism from configure
  2007-02-12  8:55     ` [Qemu-devel] " Krister Joas
@ 2007-02-12  9:17       ` Jernej Simončič
  2007-02-12 12:25         ` Krister Joas
  0 siblings, 1 reply; 7+ messages in thread
From: Jernej Simončič @ 2007-02-12  9:17 UTC (permalink / raw)
  To: Krister Joas on [qemu-devel]

On Monday, February 12, 2007, 9:55:25, Krister Joas wrote:

> You should take a look at that executable.  On most systems I know, / 
> usr/bin/which is a csh script.  It has to be because it also finds  
> aliases.  It may or may not be portable to use 'which', I'm not  
> really sure, but it's not very efficient.

On my Linux boxes, which is either a sh script (on Debian), or a (compiled)
program (on Gentoo and Slackware). On my firewall (based on FreeBSD), which
is also a program (and also a /bin/sh builtin).

-- 
< Jernej Simončič ><><><><>< http://deepthought.ena.si/ >

Matter will be damaged in direct proportion to its value.
       -- Murphy's Constant

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] Remove bash-ism from configure
  2007-02-12  9:17       ` [Qemu-devel] " Jernej Simončič
@ 2007-02-12 12:25         ` Krister Joas
  0 siblings, 0 replies; 7+ messages in thread
From: Krister Joas @ 2007-02-12 12:25 UTC (permalink / raw)
  To: qemu-devel

On Feb 12, 2007, at 6:17 PM, Jernej Simončič wrote:

> On Monday, February 12, 2007, 9:55:25, Krister Joas wrote:
>
>> You should take a look at that executable.  On most systems I know, /
>> usr/bin/which is a csh script.  It has to be because it also finds
>> aliases.  It may or may not be portable to use 'which', I'm not
>> really sure, but it's not very efficient.
>
> On my Linux boxes, which is either a sh script (on Debian), or a  
> (compiled)
> program (on Gentoo and Slackware). On my firewall (based on  
> FreeBSD), which
> is also a program (and also a /bin/sh builtin).

I stand corrected.  NetBSD seems to have removed it completely and  
instead relies on shell built-in commands.  On OpenBSD it's also a  
binary.  My references were Solaris and Mac OS X, where it's  
unfortunately still a csh script.

Krister

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-02-12 12:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-11  2:06 [Qemu-devel] [PATCH] Remove bash-ism from configure Anthony Liguori
2007-02-11 16:38 ` Johannes Schindelin
2007-02-11 17:41   ` Anthony Liguori
2007-02-11 22:58     ` [Qemu-devel] " Oleg Verych
2007-02-12  8:55     ` [Qemu-devel] " Krister Joas
2007-02-12  9:17       ` [Qemu-devel] " Jernej Simončič
2007-02-12 12:25         ` Krister Joas

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.