Re: stdint module rewrite (was: Re: Build CVS (TRUNK) failed.)

2006-06-13 Thread Ralf Wildenhues
* Bruno Haible wrote on Tue, Jun 13, 2006 at 11:00:45PM CEST: > Ralf Wildenhues wrote: > > You should be able to rewrite this to use shell loops for the most part; > Actually, that's how I started doing it: > But this way, autoheader didn't recognise the AC_DEFINE_UNQUOTED > invocations, i.e. in

Re: regex.c not 64-bit clean (?)

2006-06-13 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Santiago, [adding bug-gnulib, dropping bug-m4] According to Santiago Vila on 6/12/2006 12:07 PM: >> I suspect it will be, since I really haven't touched regex.c that much >> since 1.4.4. Then try this patch which pulls the latest regex.c from >>

Re: add gmp library dependency; get dist to work...

2006-06-13 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 [Adding bug-gnulib] According to Eric Blake-1 on 6/13/2006 10:50 AM: > Hi Ralf, > > >> (and yes, in order to be able to even get `make' to succeed, I need to >> fiddle with gnulib getopt currently; __getopt_argv_const is not #defined >> in my system

Re: stdint module rewrite

2006-06-13 Thread Bruno Haible
Paul Eggert wrote: > the same compiler, with > different options) might disagree about the standard types. So it's > not an issue of solving the problem in general; it's an issue of how > likely it would occur in practice, with the approach I proposed. We are not the only people providing a subs

Re: stdint module rewrite (was: Re: Build CVS (TRUNK) failed.)

2006-06-13 Thread Bruno Haible
Ralf Wildenhues wrote: > You should be able to rewrite this to use shell loops for the most part; > similar to how I started in this thread: > http://lists.gnu.org/archive/html/autoconf-patches/2006-04/msg00161.html > but never finished the last bits. Actually, that's how I started doing it: fo

Re: stdint module rewrite

2006-06-13 Thread Paul Eggert
Bruno Haible <[EMAIL PROTECTED]> writes: > I've once debugged a program where a header file declared a variable > of type > int (*) (const char *, struct stat *) > and part of the program was compiled with _FILE_OFFSET_BITS=64 > (implying stat := stat64) and another part of the program withou

Re: stdint module rewrite

2006-06-13 Thread Bruno Haible
Paul Eggert wrote: > The approach assumes a conventional architecture in which there are > underyling signed and unsigned types of width 8, 16, 32, and 64, and > the only argument is which int*_t type is which. Yes, and it does so using the approach "use what the system provides, and define a subs

Re: stdint module rewrite (was: Re: Build CVS (TRUNK) failed.)

2006-06-13 Thread Ralf Wildenhues
* Bruno Haible wrote on Tue, Jun 13, 2006 at 06:20:18PM CEST: > > The only downside is that it bloats up 'configure' - but autoconf 3 > should annihilate that growth, I'm told. You should be able to rewrite this to use shell loops for the most part; similar to how I started in this thread: http:/

Re: stdint module rewrite

2006-06-13 Thread Paul Eggert
Bruno Haible <[EMAIL PROTECTED]> writes: > Here is a proposed rewrite of the stdint module. It defines a > *complete* , and is autoconfiguring - no more > #ifdef __FreeBSD__ etc. that are hard to maintain. > > It appears to work fine on Solaris and HP-UX IA64. > > The only downside is that it bloa

Re: stdint module rewrite

2006-06-13 Thread Bruno Haible
Simon Josefsson wrote: > Is there anything in this that would enable me to install a "stdint.h" > file in $prefix We could just need to change all #if HAVE_... into #if @HAVE_...@ and use more substitutions in the creation of the stdint.h file. But there are two problems: - It's compiler depe

Re: Fix size_max macro

2006-06-13 Thread Bruno Haible
Paul Eggert wrote: > The basic idea seems fine, but isn't that off by a factor of 2? It defines > size_t_bits_minus_2 = sizeof (size_t) * CHAR_BIT - 2 > and then defines SIZE_MAX to (((1U << $size_t_bits_minus_2) - 1) * 2 + 1). > Unless I'm missing something, on a 32-bit host, that will set SIZE_M

Re: Fix size_max macro

2006-06-13 Thread Paul Eggert
The basic idea seems fine, but isn't that off by a factor of 2? It defines size_t_bits_minus_2 = sizeof (size_t) * CHAR_BIT - 2 and then defines SIZE_MAX to (((1U << $size_t_bits_minus_2) - 1) * 2 + 1). Unless I'm missing something, on a 32-bit host, that will set SIZE_MAX to 2147483647 instead of

Re: csharpcomp: cscc writes to srcdir?

2006-06-13 Thread Simon Josefsson
Bruno Haible <[EMAIL PROTECTED]> writes: >> Should csharpcomp copy the *.cs file before compilation, perhaps? > > I fully agree with your analysis and opinion. A compiler should not write > temporary files in the source nor in the target directory. That's what > $TMPDIR (or /tmp if unset) is made

Re: stdint module rewrite

2006-06-13 Thread Simon Josefsson
Is there anything in this that would enable me to install a "stdint.h" file in $prefix (called something like "idn-int.h"), so I can use uint32_t etc in my API, and be backwards compatible with hosts that doesn't have uint32_t natively? Compare the AX_CREATE_STDINT_H macro: http://autoconf-archive

Fix size_max macro

2006-06-13 Thread Bruno Haible
Hi, The size_max macro has a bug: it assumes that 'expr' can deal with numbers as large as SIZE_MAX/10. Which is not true when cross-compiling from a 32-bit platform to a 64-bit platform. Here is a fix, that takes care that SIZE_MAX is valid in preprocessor expressions (i.e. contains no casts).