Subject: Re: [Bruno Haible <[email-masked]>] Re: [clisp-list] can't build CVS clisp under OpenBSD 3.0 for x86

From: William Harold Newman <[email-masked]>
Date: Thu Jun 6 07:30:03 2002

On Mon, Jun 03, 2002 at 10:26:07AM -0400, Sam Steingold wrote:
> could you please try this suggestion?
> thanks!

> From: Bruno Haible <[email-masked]>

> > > Apparently a stupid include file like <i386/types.h> already defines
> > > some of these types. The solution is to change stdint.h.in to first
> > > include this file, like this:
> > > 
> > > #if defined __OpenBSD__ && defined __i386__
> > > #include <i386/types.h>
> > > #endif

> Or possibly apply the trick we are already using in win32.d:
> 
> #if defined __OpenBSD__ && defined __i386__
> #define uint8_t openbsd_uint8_t
> #include <i386/types.h>
> #undef uint8_t
> #endif
> 
> Can someone please try this? I have no access to an OpenBSD box.

OK, I tried it.

$ cvs diff stdint.h.in
balefire:clisp/ $ cvs diff src/stdint.h.in
Index: src/stdint.h.in
===================================================================
RCS file: /cvsroot/clisp/clisp/src/stdint.h.in,v
retrieving revision 1.1
diff -u -r1.1 stdint.h.in
--- src/stdint.h.in     27 May 2002 17:22:43 -0000      1.1
+++ src/stdint.h.in     6 Jun 2002 14:27:32 -0000
@@ -19,6 +19,12 @@
 #ifndef _STDINT_H
 #define _STDINT_H
 
+#if defined __OpenBSD__ && defined __i386__
+#define uint8_t openbsd_uint8_t
+#include <i386/types.h>
+#undef uint8_t
+#endif
+
 /* ISO C 99 <stdint.h> for platforms that lack it.  */
 
 /* Get wchar_t, WCHAR_MIN, WCHAR_MAX.  */
balefire:clisp/ $ 

Then I restarted the build (starting with ./configure into a new directory).
It died in make. The tail of the output looks like this:
  gcc -I/usr/local/include -W -Wswitch -Wcomment -Wpointer-arith -Wimplicit -Wreturn-type -fomit-frame-pointer -Wno-sign-compare -O2 -fexpensive-optimizations -DUNICODE -DDYNAMIC_FFI -c charstrg.c
  In file included from uniname.c:27,
                   from charstrg.d:1316:
  /usr/include/stdbool.h:18: warning: `false' redefined
  stdbool.h:43: warning: this is the location of the previous definition
  /usr/include/stdbool.h:19: warning: `true' redefined
  stdbool.h:44: warning: this is the location of the previous definition
  In file included from charstrg.d:5:
  lispbibl.d:7181: warning: register used for two global register variables
  In file included from uniname.c:27,
                   from charstrg.d:1316:
  /usr/include/stdbool.h:13: syntax error before `0'
  /usr/include/stdbool.h:15: warning: redefinition of `_Bool'
  stdbool.h:35: warning: `_Bool' previously declared here
  *** Error code 1
  
  Stop in /usr/stuff/clisp/2002-06-06 (line 1745 of Makefile).

-- 
William Harold Newman <[email-masked]>
I fought the law of Demeter, and the law of Demeter won.
PGP key fingerprint 85 CE 1C BA 79 8D 51 8C  B9 25 FB EE E0 C3 E5 7C

---

From: Sam Steingold <[email-masked]>
Date: Thu Jun 6 08:28:05 2002

> * In message <[email-masked]>
> * On the subject of "Re: [Bruno Haible <[email-masked]>] Re: [clisp-list] can't build CVS clisp under OpenBSD 3.0 for x86"
> * Sent on Thu, 6 Jun 2002 09:26:29 -0500
> * Honorable William Harold Newman <[email-masked]> writes:
>

I assume that this is _after_ you did a "cvs up".

> balefire:clisp/ $ cvs diff src/stdint.h.in

oh no - apparently, you did not do "cvs up"!

please look at config.log and unixconf.h in your build directory.
you should have HAVE_STDBOOL_H undef'ed there because, as we know, your
</usr/include/stdbool.h> is bad (`#if true' does not work with it).
in this case, makemake should add -I. to your CFLAGS, so that the
CLISP-supplied stdbool.h is used.

-- 
Sam Steingold (http://www.podval.org/~sds) running RedHat7.2 GNU/Linux
<http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
<http://www.mideasttruth.com/> <http://www.palestine-central.com/links.html>
C combines the power of assembler with the portability of assembler.

---

From: William Harold Newman <[email-masked]>
Date: Thu Jun 6 08:41:06 2002

> I assume that this is _after_ you did a "cvs up".
[...]
> oh no - apparently, you did not do "cvs up"!

Right.

When/if I get back to this, I will be sure to do "cvs up" first. (For
at least a while, I'm going to be messing with openmcl prebuilt on
cf.sf.net instead.)