Skip to content

divergence to push upstream: $cc vs eval $compile_ok #47

Open
@ntyni

Description

@ntyni

Looking for common classes of upstream divergences, I noticed this (from charorder.U):

-if $cc $ccflags -o byteorder byteorder.c >/dev/null 2>&1 ; then
+set byteorder
+if eval $compile_ok ; then

It looks to me like these are equivalent, but our version ('eval $compile_ok') is an improvement as it refactors the compilation command to a centralized place (Compile.U). So these divergences should IMO be pushed upstream.

I couldn't find the history behind these differences but I'm guessing Jarkko improved the units when importing them.

A rough estimate of the affected files is

./ls-diff.pl --pat=Compile|cut -c56-|while read i; do if ./ls-diff.pl -ddp -D-u $i |grep -q '^-.*ccflags'; then echo $i; fi; done | wc -l
36

which probably gives some false positives of course. Most of the files have other divergences too, but those can be dealt with separately.

Thoughts welcome.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions