> > Santiago Vila <[EMAIL PROTECTED]> writes: > > > > > checking for ssize_t... no > > > > This is the crucial problem (in Output2). That test cases includes > > <sys/types.h> and decides that you don't have ssize_t, so it puts > > "#define ssize_t int" into config.h. Yet, as the other files make > > clear, your host does have a ssize_t typedef in <sys/types.h>. > > Can you please inspect config.log for the failing test, and find > > out why it mistakenly thinks your host lacks ssize_t? Thanks. > > You'll going to laugh at this :-) > > configure:8876: checking for ssize_t > configure:8902: gcc -c -Wall -Werror conftest.c >&5 > cc1: warnings being treated as errors > conftest.c: In function 'main': > conftest.c:79: warning: unused variable 'x'
Phooey - that means I gave bad advice. Although autoconf is getting better at working in spite of -Werror, we are not there yet. This particular case can be easily fixed, patch below; but in general it is asking for spurious failures when configuring with -Werror. Once configured, though, running make with -Werror is good policy for portability checks. What I meant to ask you to try, rather than 'configure CFLAGS=-Werror; make', was: $ ./configure CFLAGS=-Wall $ make CFLAGS='-Wall -Werror' And see if THAT combination allows gnulib regex.c to compile cleanly. Bruno, is it okay to apply this? 2006-06-14 Eric Blake <[EMAIL PROTECTED]> * ssize_t.m4 (gt_TYPE_SSIZE_T): Work in spite of -Werror.
Index: m4/ssize_t.m4 =================================================================== RCS file: /sources/gnulib/gnulib/m4/ssize_t.m4,v retrieving revision 1.9 diff -u -p -r1.9 ssize_t.m4 --- m4/ssize_t.m4 18 Jan 2005 13:07:56 -0000 1.9 +++ m4/ssize_t.m4 15 Jun 2006 03:15:01 -0000 @@ -1,5 +1,5 @@ -# ssize_t.m4 serial 3 (gettext-0.13) -dnl Copyright (C) 2001-2003 Free Software Foundation, Inc. +# ssize_t.m4 serial 4 (gettext-0.13) +dnl Copyright (C) 2001-2003, 2006 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -11,7 +11,8 @@ AC_DEFUN([gt_TYPE_SSIZE_T], [ AC_CACHE_CHECK([for ssize_t], gt_cv_ssize_t, [AC_TRY_COMPILE([#include <sys/types.h>], - [int x = sizeof (ssize_t *) + sizeof (ssize_t);], + [int x = sizeof (ssize_t *) + sizeof (ssize_t); + return !x], gt_cv_ssize_t=yes, gt_cv_ssize_t=no)]) if test $gt_cv_ssize_t = no; then AC_DEFINE(ssize_t, int,