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: autconf stdint types checking in guile-core Date: Tue, 15 Apr 2003 15:01:19 -0400 (EDT) Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: main.gmane.org 1050433332 2791 80.91.224.249 (15 Apr 2003 19:02:12 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 15 Apr 2003 19:02:12 +0000 (UTC) Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Tue Apr 15 21:02:06 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 195Vgz-0000iK-00 for ; Tue, 15 Apr 2003 21:02:05 +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 195Vgg-0001OT-03 for guile-devel@m.gmane.org; Tue, 15 Apr 2003 15:01:46 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 195VgR-000146-00 for guile-devel@gnu.org; Tue, 15 Apr 2003 15:01:31 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 195Vg2-00009j-00 for guile-devel@gnu.org; Tue, 15 Apr 2003 15:01:06 -0400 Original-Received: from helena.whitefang.com ([216.254.175.50]) by monty-python.gnu.org with smtp (Exim 4.10.13) id 195Vfw-00089t-00 for guile-devel@gnu.org; Tue, 15 Apr 2003 15:01:00 -0400 Original-Received: (qmail 87094 invoked from network); 15 Apr 2003 19:01:19 -0000 Original-Received: from helena.whitefang.com (216.254.175.50) by 0 with SMTP; 15 Apr 2003 19:01:19 -0000 X-X-Sender: shadows@helena.whitefang.com Original-To: guile-devel@gnu.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:2164 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:2164 Robert Browning was kind enough to point out on the guile user's mailing list that guile -current recently got support for C99 stdint types. I looked at the autoconf tests for the types and would like to point out that they may break on exceptionally exotic architectures. The problem is, as most probably know, that the C standard has always defined sizeof(char) to return 1 byte. The definition of byte though is not necessarily an 8 bit storage unit. It's whatever CHAR_BIT is set to via limits.h Something like this: if test "$ac_cv_sizeof_int" -eq 4; then SCM_I_GSC_T_INT32='"int"' elif test "$ac_cv_sizeof_long" -eq 4; then ... May break because 4 in this case may mean 64 bits on a machine with 16-bit "bytes" where CHAR_BIT is 16. I'd say doing a sizeof(foo) * value of CHAR_BITS would give you the total bits and be a better indicator of int8_t, int16_t etc. This may be overzealous. I'd be glad to submit a patch to the autoconf tests to detect this more robustly. -- 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