Re: suggestion for AC_CHECK_SIZEOF

2000-05-26 Thread Alexandre Oliva
On May 26, 2000, Akim Demaille <[EMAIL PROTECTED]> wrote: > + Find a means to extract integers from the compiler. > + Use this technology to compute `sizeof' even when cross-compiling. > + Ideas and initial suggestion by Kaveh Ghazi. > + Binary search by Bruno Haible. Ok -- Ale

Re: suggestion for AC_CHECK_SIZEOF

2000-05-26 Thread Akim Demaille
Here is my proposal. Index: ChangeLog === RCS file: /cvs/autoconf/ChangeLog,v retrieving revision 1.652 diff -u -r1.652 ChangeLog --- ChangeLog 2000/05/26 09:42:13 1.652 +++ ChangeLog 2000/05/26 10:15:47 @@ -1,3 +1,20 @@ +200

Re: suggestion for AC_CHECK_SIZEOF

2000-05-26 Thread Akim Demaille
Akim> jk: dju Y dfgg qwer tyu] Llps, slrry, I meant Nl, but I wioo send lne!

Re: suggestion for AC_CHECK_SIZEOF

2000-05-26 Thread Akim Demaille
jk: dju Y dfgg qwer tyu]

Re: suggestion for AC_CHECK_SIZEOF

2000-05-26 Thread Alexandre Oliva
On May 26, 2000, Akim Demaille <[EMAIL PROTECTED]> wrote: > |On May 25, 2000, Akim Demaille <[EMAIL PROTECTED]> wrote: > |> # AC_LANG_BOLL_COMPILE_TRY(PROLOGUE, EXPRESSION) > | s/BOLL/BOOL/ > Lps, thanks! > Is this a LK? I cluldn't find a patch anywhere. Was that supplsed

Re: suggestion for AC_CHECK_SIZEOF

2000-05-26 Thread Akim Demaille
|On May 25, 2000, Akim Demaille <[EMAIL PROTECTED]> wrote: |> # AC_LANG_BOLL_COMPILE_TRY(PROLOGUE, EXPRESSION) | s/BOLL/BOOL/ Lps, thanks! Is this a LK?

Re: suggestion for AC_CHECK_SIZEOF

2000-05-25 Thread Alexandre Oliva
On May 25, 2000, Akim Demaille <[EMAIL PROTECTED]> wrote: > # AC_LANG_BOLL_COMPILE_TRY(PROLOGUE, EXPRESSION) s/BOLL/BOOL/ -- Alexandre OlivaEnjoy GuaranĂ¡, see http://www.ic.unicamp.br/~oliva/ Cygnus Solutions, a Red Hat companyaoliva@{redhat, cygnus}.com Free Softwa

Re: suggestion for AC_CHECK_SIZEOF

2000-05-25 Thread Akim Demaille
Updated. AC_CHECK_SIZEOF has never been released with support of shell variables, not my stepping back is backward compatible, and there is no real loss. /tmp % ./configure nostromo 12:08 checking for gcc... gcc checking whether the C compiler works

Re: suggestion for AC_CHECK_SIZEOF

2000-05-20 Thread Peter Eisentraut
Alexandre Oliva writes: > It's outdated. The C and the C++ standards specify that If everyone followed standards then we wouldn't need Autoconf, would we? And of course Autoconf definitely supports pre-ANSI C. > Indeed. How about ``The size of a `long int', as computed by sizeof''. Sounds re

Re: suggestion for AC_CHECK_SIZEOF

2000-05-19 Thread Alexandre Oliva
On May 19, 2000, Akim Demaille <[EMAIL PROTECTED]> wrote: > Should AC_CHECK_SIZEOF(foo) run AC_CHECK_TYPE(foo) first? Yup -- Alexandre OlivaEnjoy GuaranĂ¡, see http://www.ic.unicamp.br/~oliva/ Cygnus Solutions, a Red Hat companyaoliva@{redhat, cygnus}.com Free Software Developer and

Re: suggestion for AC_CHECK_SIZEOF

2000-05-19 Thread Alexandre Oliva
On May 19, 2000, Peter Eisentraut <[EMAIL PROTECTED]> wrote: > Alexandre Oliva writes: >> >[The number of bytes in a `]$1['.]) >> ^ chars, actually >> >> sizeof(char) == 1 always holds, but it doesn't have to be a byte. > K&R1 says: It's outdated. The C and the C++ sta

Re: suggestion for AC_CHECK_SIZEOF

2000-05-19 Thread Akim Demaille
> "Peter" == Peter Eisentraut <[EMAIL PROTECTED]> writes: Peter> Akim Demaille writes: >> Here is my interpretation of your work. Peter> That looks very nice, but there is one problem I see: When Peter> cross-compiling, AC_CHECK_SIZEOF with a non-existant type Peter> seemingly runs forever.

Re: suggestion for AC_CHECK_SIZEOF

2000-05-18 Thread Peter Eisentraut
Alexandre Oliva writes: > >[The number of bytes in a `]$1['.]) > ^ chars, actually > > sizeof(char) == 1 always holds, but it doesn't have to be a byte. K&R1 says: "The expression `sizeof(object)' yields an integer equal to the size o

Re: suggestion for AC_CHECK_SIZEOF

2000-05-18 Thread Peter Eisentraut
Akim Demaille writes: > Here is my interpretation of your work. That looks very nice, but there is one problem I see: When cross-compiling, AC_CHECK_SIZEOF with a non-existant type seemingly runs forever. Perhaps it should check the existance of the type first. Also, what I'd find useful is a w

Re: suggestion for AC_CHECK_SIZEOF

2000-05-18 Thread Akim Demaille
> "Alexandre" == Alexandre Oliva <[EMAIL PROTECTED]> writes: Alexandre> Really cute :-) Congrats, Thanks :) I still wonder about the name (_AC_COMPUTE etc.). I don't know too well. Alexandre> sizeof(char) == 1 always holds, but it doesn't have to be a Alexandre> byte. Aha! indeed. Than

Re: suggestion for AC_CHECK_SIZEOF

2000-05-17 Thread Alexandre Oliva
On May 16, 2000, Akim Demaille <[EMAIL PROTECTED]> wrote: > Here is my interpretation of your work. Alexandre, what do you think > about it? Really cute :-) Congrats, >[The number of bytes in a `]$1['.]) ^ chars, actually sizeof(cha

Re: suggestion for AC_CHECK_SIZEOF

2000-05-16 Thread Akim Demaille
> "Bruno" == Bruno Haible <[EMAIL PROTECTED]> writes: Bruno> Hi Akim, Your implementation indeed has the aesthetics you were Bruno> asking for; congratulations. Thanks :) >> `conftestdate'. Bruno> That should be `conftestval', not `conftestdate'. Gromph, thanks! Akim

Re: suggestion for AC_CHECK_SIZEOF

2000-05-16 Thread Bruno Haible
Hi Akim, Your implementation indeed has the aesthetics you were asking for; congratulations. > # AC_LANG_COMPUTE(PROLOGUE, EXPRESSION) > # - > # Produce a program that saves the runtime evaluation of the integer > # EXPRESSION into `conftestdate'. That should

Re: suggestion for AC_CHECK_SIZEOF

2000-05-16 Thread Akim Demaille
Hi Bruno, Here is my interpretation of your work. Alexandre, what do you think about it? This implementation requires CVS Autoconf. Install it as `configure.in' and CVS autoconf it to give it a try. # aclang.m4 # AC_LANG_BOOLEAN(PROLOGUE, EXPRESSI

Re: suggestion for AC_CHECK_SIZEOF

2000-05-04 Thread Akim Demaille
> "Bruno" == Bruno Haible <[EMAIL PROTECTED]> writes: >> Does [testing the signedness] make sense for other types than `char'? Bruno> Yes. In particular size_t and wchar_t come to mind. Wow, signed size_t :) Where can we see that? What effect can it have so that you might need to check fo

Re: suggestion for AC_CHECK_SIZEOF

2000-05-03 Thread Bruno Haible
Akim Demaille writes: > Bruno> 2) AC_CHECK_TYPE_SIGNED using > > Bruno> #define expr ((expr)(-1) < (expr)0) > > Good point. > > Does this test make sense for other types than `char'? Yes. In particular size_t and wchar_t come to mind. Bruno

Re: suggestion for AC_CHECK_SIZEOF

2000-05-03 Thread Akim Demaille
> "Bruno" == Bruno Haible <[EMAIL PROTECTED]> writes: >> Just say no to >> >> changequote() patsubst($1, [^a-z]) changequote([, ]) >> >> but welcome >> >> patsubst([$1], [[^a-z]]) Bruno> Ah! The outer [] are against m4, and the inner ones "[^a-z]" Bruno> are the patsubst argument, right?

Re: suggestion for AC_CHECK_SIZEOF

2000-05-02 Thread Bruno Haible
Akim Demaille writes: > Just a note about changequote. Although you would certainly have > problems with the characters [ and ] themselves, there is really no > reason to use it when using patsubst. This is a very bad (IMHO) idiom > which is spread by Autoconf itself. > > Just say no to > >

Re: suggestion for AC_CHECK_SIZEOF

2000-05-02 Thread Akim Demaille
> "Akim" == Akim Demaille <[EMAIL PROTECTED]> writes: Akim> It's more readable, and even `more true' (don't know how to say Akim> this in proper English, `more correct' I suppose). Got it! `Accurate', isn't it?

Re: suggestion for AC_CHECK_SIZEOF

2000-05-02 Thread Akim Demaille
> "Bruno" == Bruno Haible <[EMAIL PROTECTED]> writes: Bruno> You should have seen the big patsubst while it was still in one Bruno> big line :-) :) :) Just a note about changequote. Although you would certainly have problems with the characters [ and ] themselves, there is really no reason

Re: suggestion for AC_CHECK_SIZEOF

2000-05-02 Thread Bruno Haible
Akim Demaille writes: > Also, it has a hidden bell: take a look at this: > > | ac_ac_Sizeof=`echo "ac_cv_sizeof_$int" | $ac_tr_sh` > | if eval "test \"\${$ac_ac_Sizeof+set}\" = set"; then > | echo $ECHO_N "(cached) $ECHO_C" >&6 > | eval "$ac_ac_Sizeof=`cat conftestval`" > | eval "$ac_ac_Si

Re: suggestion for AC_CHECK_SIZEOF

2000-05-02 Thread Akim Demaille
> "Bruno" == Bruno Haible <[EMAIL PROTECTED]> writes: Bruno> Akim Demaille writes: >> In addition, the style you used is very much 2.13 like, but it is >> completely different from the style used for CVS Autoconf. You can >> delete almost all your `dnl's, use `#' for comments, not `dnl' etc

Re: suggestion for AC_CHECK_SIZEOF

2000-05-02 Thread Bruno Haible
Akim Demaille writes: > In addition, the style you used is very much 2.13 like, but it is > completely different from the style used for CVS Autoconf. You can > delete almost all your `dnl's, use `#' for comments, not `dnl' etc. > Finally, you used changequote, which is eradicated from Autoconf,

Re: suggestion for AC_CHECK_SIZEOF

2000-05-02 Thread Akim Demaille
Hi Bruno, I like the idea of the patch, yet several people proposed patch along this way, but I don't like the implementation. There's a lot of hair which is due to the fact that you want to cache low level details, such as what you computed. I think this is not right, you should cache what you