On Fri, 16 Jun 2000, Thomas E. Dickey wrote:

> On Fri, 16 Jun 2000, Mo DeJong wrote:
> > Well, something like the following patch would work.
> ...something like (there are two places the look like problems):
> 
> > +ac_cv_prog_cc_g_smaller=`od conftest_smaller.o`
> 
> od will suppress rows that contain only 0's, making the size look
> different.

We don't care about the exact size, only that one object file is
bigger than the other.
 
> > +if test $ac_cv_prog_cc_g_bigger -gt $ac_cv_prog_cc_g_smaller ; then
> why do you think the output of `od` will be a single number?
> (Perhaps output of 'ls', but that gets into the problem of getting a
> format of ls).

Because earlier in the test ac_cv_prog_cc_g_bigger is set to the
length of the output of od.

> Better to simply run a test program that uses only stdio.h (checking if
> opening the object file in binary mode works ;-)

That might not be a bad idea. I don't like to depend on od just
to get the size of a file. Am I just missing something? Is there
an easy way to figure out the size of a binary file in bytes?

`ls` or `ls -S` is not going to cut it.

Mo DeJong
Red Hat Inc

Reply via email to