Re: Building m4 on BSDI 4.0.1

Chris McGuire <[email protected]>
Newsgroups gmane.comp.gnu.m4.bugs,gmane.comp.gnu.m4.patches
Message-ID <[email protected]>
>You didn't say which instance of ss_sp.

All instances I believe.

>However, I think this patch does
>the trick.  Let me know if you need a private snapshot of 1.4.8a with the
>patch pre-applied (and configure regenerated), to test it out on your machine.

Well, if you are willing, it would help me out. :)



>> source='mbchar.c' object='mbchar.o' libtool=no \
>>         DEPDIR=.deps depmode=gcc /bin/bash ../depcomp \
>>         gcc  -I.     -g -O2 -c mbchar.c
>> In file included from mbchar.h:157,
>>                  from mbchar.c:22:
>> /usr/include/wchar.h:16: syntax error before `*'
>
>I'm still not sure why your system wchar.h breaks the compile.  What does
>/usr/include/wchar.h look like around line 16?  ('head -n20
>/usr/include/wchar.h' might be useful).  Once we figure out what
>prerequisite header is missing from gnulib's mbchar.[ch], we can hopefully
>get that fixed.

Here's the output you requested:
----------------------------------------------
/*      BSDI wchar.h,v 2.1 1997/10/30 22:40:34 donn Exp */

/*
 * Wide character support.
 */

typedef int wint_t;
typedef int wctype_t;

#define WEOF    (-1)
#define EILSEQ  101

wint_t fgetwc(FILE *stream);
wint_t getwc(FILE *stream);
wint_t getwchar();
wchar_t * fgetws(wchar_t *ws, int n, FILE *stream);
wint_t fputwc(wint_t wc, FILE *stream);
wint_t putwc(wint_t wc, FILE *stream);
wint_t putwchar(wint_t wc);
int fputws(const wchar_t *ws, FILE *stream);



>2006-12-20  Eric Blake  <[email protected]>
>
>        * configure.ac (AC_CHECK_MEMBERS): Check for stack_t.ss_sp, and
>        assume the fallback of ss_base for BSDI 4.0.1.
>        * src/stackovf.c (setup_stackovf_trap) [HAVE_SIGALTSTACK &&
>        ! HAVE_STACK_T_SS_SP]: Use this check.
>        Reported by Chris McGuire.
>        * THANKS: Update.
>
>- --
>Life is short - so eat dessert first!
>
>Eric Blake             [email protected]
>
>-----BEGIN PGP SIGNATURE-----
>Version: GnuPG v1.4.5 (Cygwin)
>Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
>Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
>iD8DBQFFigBs84KuGfSFAYARAnY0AKC8NGLZEeD1tdTVAleTMBqDmIIxhQCgwhe3
>EhJ6tHwZKbddhfIYp05D4kU=
>=P/2W
>-----END PGP SIGNATURE-----
>
>Index: configure.ac
>===================================================================
>RCS file: /sources/m4/m4/configure.ac,v
>retrieving revision 1.36.2.32
>diff -u -p -r1.36.2.32 configure.ac
>--- configure.ac        9 Dec 2006 17:06:30 -0000       1.36.2.32
>+++ configure.ac        21 Dec 2006 03:25:18 -0000
>@@ -43,6 +43,12 @@ AC_CHECK_TYPES([siginfo_t], [], [],
> AC_CHECK_MEMBERS([struct sigaction.sa_sigaction], [], [],
> [[#include <signal.h>
> ]])
>+AC_CHECK_MEMBERS([stack_t.ss_sp], [], [],
>+[[#include <signal.h>
>+#if HAVE_SIGINFO_H
>+# include <siginfo.h>
>+#endif
>+]])
> 
> AC_TYPE_SIGNAL
> AC_TYPE_SIZE_T
>Index: src/stackovf.c
>===================================================================
>RCS file: /sources/m4/m4/src/stackovf.c,v
>retrieving revision 1.1.1.1.2.6
>diff -u -p -r1.1.1.1.2.6 stackovf.c
>--- src/stackovf.c      3 Aug 2006 12:51:05 -0000       1.1.1.1.2.6
>+++ src/stackovf.c      21 Dec 2006 03:25:18 -0000
>@@ -341,6 +341,11 @@ Error - Do not know how to set up stack-
> 
>   {
>     stack_t ss;
>+# ifndef HAVE_STACK_T_SS_SP
>+    /* This workaround is for BSDI 4.0.1:
>+       http://lists.gnu.org/archive/html/bug-m4/2006-12/msg00004.html  */
>+#  define ss_sp ss_base
>+# endif
> 
>     ss.ss_size = SIGSTKSZ;
>     ss.ss_sp = xmalloc ((unsigned) ss.ss_size);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.