canonicalize-lgpl: fix compilation error on mingw

2006-12-23 Thread Bruno Haible
This fixes a build error on mingw, if you happen to use the sys_stat module together with the canonicalize-lgpl module. 2006-12-23 Bruno Haible [EMAIL PROTECTED] * lib/canonicalize-lgpl.c (__realpath): Test HAVE_READLINK instead of S_ISLNK. Needed because gnulib's

make safe_read usable in a mixed C/C++ build

2006-12-23 Thread Bruno Haible
Hi Jim, For some complicated reasons (too long to explain here), gettext needs to use safe-read.h with a C++ compiler on mingw and cygwin. Is this patch ok with you? 2006-12-23 Bruno Haible [EMAIL PROTECTED] * lib/safe-read.h [C++]: Wrap declarations in extern C. ***

Re: GCC optimizes integer overflow: bug or feature?

2006-12-23 Thread Denis Vlasenko
On Saturday 23 December 2006 10:06, Rask Ingemann Lambertsen wrote: No, because you'd read past the end of the array: #include stdlib.h int main (int argc, char *argv[]) { char *a; if ((a == malloc (sizeof (char { int r; a[0] = 1; r = f (a);

Re: GCC optimizes integer overflow: bug or feature?

2006-12-23 Thread Rask Ingemann Lambertsen
On Fri, Dec 22, 2006 at 01:58:39AM +0100, Denis Vlasenko wrote: Or this, absolutely typical C code. i386 arch can compare 16 bits at a time here (luckily, no alighment worries on this arch): # cat tt.c int f(char *p) { if (p[0] == 1 p[1] == 2) return 1; return 0; } No,

Re: coreutils 6.6 fails to compile on IRIX 5.3

2006-12-23 Thread Paul Eggert
Bruno Haible [EMAIL PROTECTED] writes: ! #if HAVE_WCHAR_H ! # include wctype.h ! #else ! # ifndef iswprint ! # define iswprint(wc) 1 ! # endif ! #endif That should work, but I'd prefer something less intrusive on uses of the module, so that the source code says only #include wctype.h.