From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Thamer Al-Harbash Newsgroups: gmane.lisp.guile.devel Subject: Re: autconf stdint types checking in guile-core Date: Wed, 16 Apr 2003 03:28:21 -0400 (EDT) Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Message-ID: References: <87k7dvc6hn.fsf@raven.i.defaultvalue.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: main.gmane.org 1050478367 27146 80.91.224.249 (16 Apr 2003 07:32:47 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 16 Apr 2003 07:32:47 +0000 (UTC) Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Wed Apr 16 09:32:45 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 195hPR-00073h-00 for ; Wed, 16 Apr 2003 09:32:45 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 195hP9-00034L-08 for guile-devel@m.gmane.org; Wed, 16 Apr 2003 03:32:27 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 195hOY-0002dD-00 for guile-devel@gnu.org; Wed, 16 Apr 2003 03:31:50 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 195hOW-0002aq-00 for guile-devel@gnu.org; Wed, 16 Apr 2003 03:31:49 -0400 Original-Received: from helena.whitefang.com ([216.254.175.50]) by monty-python.gnu.org with smtp (Exim 4.10.13) id 195hKq-0001vU-00 for guile-devel@gnu.org; Wed, 16 Apr 2003 03:28:00 -0400 Original-Received: (qmail 91086 invoked from network); 16 Apr 2003 07:28:21 -0000 Original-Received: from helena.whitefang.com (216.254.175.50) by 0 with SMTP; 16 Apr 2003 07:28:21 -0000 X-X-Sender: shadows@helena.whitefang.com Original-To: guile-devel@gnu.org In-Reply-To: <87k7dvc6hn.fsf@raven.i.defaultvalue.org> X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Developers list for Guile, the GNU extensibility library List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.devel:2167 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:2167 On Wed, 16 Apr 2003, Rob Browning wrote: > Actually, this may be hard to get right. I haven't yet figured out a > way to get the value of CHAR_BIT either at configure time, or from the > C compiler at gen-scmconfig time in the cross-compilation case... Is AC_TRY_RUN at configure time bad for cross compilation? I'm assuming it is. Otherwise, AC_TRY_RUN a program that includes limits.h, outputs the number of bits to a temporary file, read it in and then make sure to put that temporary file in CLEANFILES in the Makefile.am If CHAR_BITS is not defined put -1 in the file meaning undefined. The only other way is to use the preprocessor. I'm fairly certain using -dM won't be portable everywhere though :| char_bits=echo "#include " | cpp -dM | awk '/#define.*CHAR_BIT/ { pintf("%s", $3);}' Using the preprocessor is more friendly to cross compilation since we'd be, technically, be preprocessing the target hosts header files. -- Thamer Al-Harbash http://www.whitefang.com/ (if (> pressure too-much-pressure) 'flame 'work) _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel