On Wed, 25 Sep 2013 18:07:17 +0200 Irek Szczesniak wrote:
> On Wed, Sep 25, 2013 at 5:59 PM, Glenn Fowler <[email protected]> wrote:
> >
> > On Wed, 25 Sep 2013 17:01:06 +0200 Irek Szczesniak wrote:
> >> On Wed, Sep 25, 2013 at 2:49 PM, Glenn Fowler <[email protected]> 
> >> wrote:
> >> >
> >> > this is just a general comment on those contemplating adding
> >> > #ifdef to select option visibility based on the underlying system
> >
> >> Is this about md5sum(1)? AFAIK the *defaults* are platform-specific,
> >> based on what Windows does, but not the availability of the options.
> >> Or is this something different?
> >
> > md5sum triggered the comment
> > but there are / have been other patches in the queue that do similar this
> > libcmd::sync(1) and ksh93::cd(1) -@ come to mind
> > I wanted to nip it in the bud so it doesn't become a habit
> >
> > now re md5sum
> >
> > the gnu docs are fouled up because they don't match gnu-ish reality on 
> > cygwin
> > cygwin actually gets it right by making --binary the default
> > but that leads to
> >         gnu-md5sum *.tgz > gnu-output
> > run on linux and cygwin, for the same set of files, producing different 
> > results
> > the md5sum (should) match but the cygwin output will have the '*' indicator
> >
> > suppose, for the same set of *.tgz you do this on cygwin
> >         gnu-md5sum *.tgz > cygwin-output
> > and this on linux
> >         gnu-md5sum *.tgz > linux-output
> > on cygwin this will fail
> >         gnu-md5sum --check linux-output
> > at least on linux this will work
> >         gnu-md5sum --check cygwin-output
> >
> > the *ast* --binary default is not platform specific because it is consistent
> > across unix and _WINIX and honors the principle of least surprise
> > so this
> >         ast-md5sum *.tgz > ast-output
> > and this
> >         ast-md5sum --check ast-output
> > will work no matter what platform either command is executed on
> >
> > the next alpha, probably later today to fix the ASTAPI() build problem, will
> > have libcmd::cksum(1) and libsum fixed to generate and consume the ' ' and 
> > '*'
> > read mode indicators -- the only thing will be that on all systems by 
> > default
> > ast md5sum will print the '*' indicator

> Why do you want to do that?

I just explained why -- consistency between unix and _WINIX

cygwin already learned this but apparently just patched for _CYGWIN
instead of pushing the correct behavior upstream

> On *LINUX* and Solaris 10 with /usr/gnu/bin/mdsum I get this:
> /usr/bin/md5sum /usr/bin/md5sum
> 85e85dcf910f4c5d1dd1729b2c81e584  /usr/bin/md5sum
> /usr/bin/md5sum --binary /usr/bin/md5sum
> 85e85dcf910f4c5d1dd1729b2c81e584 */usr/bin/md5sum

> This happens because --text and --binary are identical on Linux and Solaris.

aha you drank the gnu man page koolaid
they are not identical : --binary outputs the * indicator

I bet a large %-age of gnu linxu/solaris scripts relying on this bogus behaviour
would fail running on _WINIX -- you may not care but folks who deal with
moving data between unix <=> _WINIX do

_______________________________________________
ast-developers mailing list
[email protected]
http://lists.research.att.com/mailman/listinfo/ast-developers

Reply via email to