[ENet-discuss] [Fwd: Size assumptions]
Bruce Mitchener
enet-discuss@cubik.org
Sat, 08 Mar 2003 16:04:30 -0700
This is a multi-part message in MIME format.
--------------060709050004050302060707
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
--------------060709050004050302060707
Content-Type: message/rfc822;
name="Size assumptions"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="Size assumptions"
Return-Path: <hook_l@pyrogon.com>
Received: from smtp804.mail.sc5.yahoo.com (smtp804.mail.sc5.yahoo.com [66.163.168.183])
by bellevue.puremagic.com (8.12.8/8.12.8/Debian-1) with SMTP id h28LYnZn016999
for <enet-discuss@cubik.org>; Sat, 8 Mar 2003 13:34:49 -0800
Message-Id: <200303082134.h28LYnZn016999@bellevue.puremagic.com>
Received: from adsl-66-123-232-62.dsl.sndg02.pacbell.net (HELO HOOKDELL220) (pyrogon@sbcglobal.net@66.123.232.62 with login)
by smtp-sbc-v1.mail.vip.sc5.yahoo.com with SMTP; 8 Mar 2003 21:34:48 -0000
From: Brian Hook <hook_l@pyrogon.com>
To: <enet-discuss@cubik.org>
X-Mailer: PocoMail 2.63 (1077) - Licensed Version
Date: Sat, 8 Mar 2003 13:35:23 -0800
In-Reply-To: <200303081919.h28JJJZn012091@bellevue.puremagic.com>
Subject: Size assumptions
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
X-Virus-Scanned: by AMaViS-ng (Milter interface)
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by bellevue.puremagic.com id h28LYnZn016999
Currently euint32 is defined as an unsigned long, which will fail on
some 64-bit platforms. You may want to place a compile time
assertion to validate the sizes, or at the least have a run-time
validation in enet_initialize().
Also, enums are placed directly in structs. Since the size of an
enum is never guaranteed, this might cause potential problems if any
of this stuff is serialized improperly or if, in the case of shared
libraries, different compilers with different enum size rules are
used for the caller and lib.
Brian
--------------060709050004050302060707--