Benny Siegert | 1 Jan 2010 15:04
Picon
Gravatar

Re: CVS: herc.mirbsd.org: ports

On Thu, Dec 31, 2009 at 19:34, Thorsten Glaser <tg@...> wrote:
> Backport upstream’s SECURITY fix for CVE-2009-3736 from
> http://git.savannah.gnu.org/cgit/libtool.git/commit/?h=branch-1-5&id=29b48580df75f0c5baa2962548a4c101ec7ed7ec

Nice, thanks!

--Benny.

--
The first essential in chemistry is that you should perform practical
work and conduct experiments, for he who performs not practical work
nor makes experiments will never attain the least degree of mastery.
       -- Abu Musa Jabir ibn Hayyan (721-815)

Thorsten Glaser | 4 Jan 2010 22:15
Picon
Gravatar

Re: ksh93 'typeset -n' definition question

Hi again,

there's another question: why does ksh93 (at least the one
from Debian unstable) fail this with a syntax error during
'foo' dereference time?

typeset -n foo=bar[i]
bar=(b c a)
for i in 0 1 2 3; do
	print $i $foo .
done

In mksh, surprisingly, this works as expected ('0 b .' etc).

On the ${%x} thing, I've now implemented it so that it will
return -1 if an ASCII, latin1 or Unicode control character
is contained, and the width (Unicode mode) or number of oc-
tets (non-Unicode mode) otherwise. Here, control character
is (in both modes) what wcwidth() returns -1 on. I think
this makes the most sense, is the most consistent and will
be easier to implement in shells that actually use wcwidth
and the OS' locale functions.

bye,
//mirabilos
--

-- 
«MyISAM tables -will- get corrupted eventually. This is a fact of life. »
“mysql is about as much database as ms access” – “MSSQL at least descends
from a database” “it's a rebranded SyBase” “MySQL however was born from a
flatfile and went downhill from there” – “at least jetDB doesn’t claim to
(Continue reading)

David Korn | 5 Jan 2010 17:51
Picon

Re: Re: ksh93 'typeset -n' definition question

cc:  miros-discuss@...
Subject: Re: Re: ksh93 'typeset -n' definition question
--------

> Hi again,
> 
> there's another question: why does ksh93 (at least the one
> from Debian unstable) fail this with a syntax error during
> 'foo' dereference time?
> 
> typeset -n foo=bar[i]
> bar=(b c a)
> for i in 0 1 2 3; do
>         print $i $foo .
> done
> 

I just ran it with the current version and I get

0 b .
1 b .
2 b .
3 b .

for output.  Note that since i was not defined when the reference
was made, foo was a name reference to bar[0].

David Korn
dgk@...

(Continue reading)

Thorsten Glaser | 5 Jan 2010 19:43
Picon
Gravatar

Re: Re: ksh93 'typeset -n' definition question

David Korn dixit:

>I just ran it with the current version and I get
[...]

Hm ok, so Debian's version is lagging behind quite some.
Do you plan on keeping this behaviour? If so, I'll docu-
ment this deviation, as I fully intend to have this kind
of lazy evaluation (it may simplify loops, for example).

bye,
//mirabilos
--

-- 
“It is inappropriate to require that a time represented as
 seconds since the Epoch precisely represent the number of
 seconds between the referenced time and the Epoch.”
	-- IEEE Std 1003.1b-1993 (POSIX) Section B.2.2.2

David Korn | 5 Jan 2010 21:32
Picon

Re: Re: Re: ksh93 'typeset -n' definition question

cc:  miros-discuss@...
Subject: Re: Re: Re: ksh93 'typeset -n' definition question
--------

> Hm ok, so Debian's version is lagging behind quite some.
> Do you plan on keeping this behaviour? If so, I'll docu-
> ment this deviation, as I fully intend to have this kind
> of lazy evaluation (it may simplify loops, for example).
> 
> bye,
> //mirabilos
> 

Yes, I plan on keeping this, although I might consider
a mechanism for lazy evaluation, for example
	typeset -n bar=foo[ <at> i]

Do you allow any expression fo the subscript or just the name of a variable?

David Korn
dgk@...

Thorsten Glaser | 5 Jan 2010 22:43
Picon
Gravatar

Re: Re: Re: ksh93 'typeset -n' definition question

David Korn dixit:

>Do you allow any expression fo the subscript or just the name of a variable?

Everything after the = is stored as "content" of the variable
backing the nameref, and evaluated on each deref as if it were
written between ${...} so everything (I think, although I have
not yet tried, even with side effects).

bye,
//mirabilos
--

-- 
Sometimes they [people] care too much: pretty printers [and syntax highligh-
ting, d.A.] mechanically produce pretty output that accentuates irrelevant
detail in the program, which is as sensible as putting all the prepositions
in English text in bold font.	-- Rob Pike in "Notes on Programming in C"

David Korn | 5 Jan 2010 23:06
Picon

Re: Re: Re: Re: ksh93 'typeset -n' definition question

cc:  miros-discuss@...
Subject: Re: Re: Re: Re: ksh93 'typeset -n' definition question
--------

> Everything after the = is stored as "content" of the variable
> backing the nameref, and evaluated on each deref as if it were
> written between ${...} so everything (I think, although I have
> not yet tried, even with side effects).
> 

There are existing script that bind to a specific element of an
array and later change the subscript expecting the binding.

These would break if this binding were lazy.  That is why I would
want a separate way for each of them.

David Korn
dgk@...

Thorsten Glaser | 5 Jan 2010 23:49
Picon
Gravatar

Re: ksh93 'typeset -n' definition question

David Korn dixit:

>There are existing script that bind to a specific element of an
>array and later change the subscript expecting the binding.
>
>These would break if this binding were lazy.  That is why I would
>want a separate way for each of them.

Hm indeed, I understand. I will document all this then.

As for the difference between ksh93 and mksh, due to the
limitations of my parser our nameref semantics are already
different enough that code cannot easily be shared except
in the most simple cases, so I can live with not accomodating
these scripts. I hope you're not offended by my choices for
difference sometimes.

bye,
//mirabilos
--

-- 
Sometimes they [people] care too much: pretty printers [and syntax highligh-
ting, d.A.] mechanically produce pretty output that accentuates irrelevant
detail in the program, which is as sensible as putting all the prepositions
in English text in bold font.	-- Rob Pike in "Notes on Programming in C"

Benny Siegert | 6 Jan 2010 18:33
Picon
Gravatar

RFC: INSTALL_STRIP on Darwin

Hi,

I fixed lang/python/2.5 to be usable again on Darwin. Before, all
modules that loaded a bundle (such as math) raised a Traceback on load
with a message stating that a symbol was not found. It turns out that
if you install the Python binary with "install -s", it no longer
exports ANY symbols for the bundles to bind to. The fix is thus to set
INSTALL_STRIP= (empty string).

In Darwin, the strip(1) manpage says:

      If  the  executable loads objects, however, the global symbols that the
       objects reference from the executable also must not  be  stripped.

So I am wondering if we should set INSTALL_STRIP= as the global
default on Darwin, as any program using plugins which in turn use
symbols from the main executable won't work.

Comments?

--Benny.

--

-- 
The first essential in chemistry is that you should perform practical
work and conduct experiments, for he who performs not practical work
nor makes experiments will never attain the least degree of mastery.
        -- Abu Musa Jabir ibn Hayyan (721-815)


Gmane